04-23-2010, 07:21 PM | #1 |
Connoisseur
Posts: 60
Karma: 151
Join Date: Apr 2010
Device: DR800SG
|
Some DR800 dev questions
I'm building a PDF viewer tailored towards technical documents (good support for rearranging multicolumn docs, etc). It's in poppler + gtk.
I'm having some platformy issues: 1) When I just draw the pages directly, it doesn't trigger the DR800's GTK+ to do a full refresh. So, I added an explicit gdk_display_sync and ioctl to make it to the full refresh ... and now it does it twice! At present I'm stumped as per why. 2) The "please wait" dialog isn't disappearing properly. The first thing I do is pop up a file chooser dialog, but when I do that the "please wait" dialog continues to float on top of it indefinitely ... perhaps this is just a bug in the GTK file chooser dialog (not updating properly) ... is it possible to explicitly hide it? Thanks for any help! (PS: Should this go in the iLiad Developer's Corner? Not actually an iLiad ... ) |
04-24-2010, 06:48 AM | #2 | |
Guru
Posts: 730
Karma: 72743
Join Date: Feb 2008
Location: Here or there
Device: iRex iLiad, iRex DR800S. K4NT. Kobo Aura, Aura One, Libra 2.
|
Quote:
Regarding the second one, I've also observed the same when the application is started using a shell script. |
|
Advert | |
|
04-24-2010, 07:31 AM | #3 | ||
ex-IRX developer
Posts: 158
Karma: 224
Join Date: Oct 2008
Device: Irex DR800S, DR1000S, iLiad
|
Quote:
Quote:
In the 1.0 release, the dialog is removed as soon as a full screen window is opened, or after 30 seconds. You could try to work around this by opening a window first and show the file chooser dialog on top of it. I don't have the details at hand, but I believe this is reworked in the 2.0 release so that the dialog is removed as soon as the application has started. |
||
04-24-2010, 09:54 AM | #4 | ||
Connoisseur
Posts: 60
Karma: 151
Join Date: Apr 2010
Device: DR800SG
|
Quote:
Quote:
|
||
04-24-2010, 05:42 PM | #5 |
Connoisseur
Posts: 60
Karma: 151
Join Date: Apr 2010
Device: DR800SG
|
I have both the previous questions answered (enough). I'm trying to properly use the IPC mechanism to handle the menu and page refreshes, but I'm failing miserably ... can somebody tell me what I'm missing? Here's the code:
Code:
gboolean sys_startup_complete(void *vp) { View *v = (View *) vp; const int xid = GDK_WINDOW_XID(v->window->window); eripc_sysd_startup_complete( eipccc, getpid(), TRUE, xid); return FALSE; } ... void menu_handler(eripc_context_t *context, const eripc_event_info_t *info, void *user_data) { const eripc_arg_t *arg_array = info->args; printf("FEH!\n"); if ((arg_array[0].type == ERIPC_TYPE_STRING) && (arg_array[1].type == ERIPC_TYPE_STRING) && (arg_array[2].type == ERIPC_TYPE_STRING) && (arg_array[3].type == ERIPC_TYPE_STRING)) { const char *item = arg_array[0].value.s; const char *group = arg_array[1].value.s; const char *menu = arg_array[2].value.s; const char *state = arg_array[3].value.s; printf("%s %s %s %s\n", state, menu, group, item); } } ... int main() { ... eripc_callback_function_t callbacks[] = { { menu_handler, "menuItemActivated", NULL }, { NULL } }; ... /* set up eripc */ eipccc = eripc_client_context_new( "techpdf", "0.1", "org.codu.techpdf", "/org/codu/techpdf", "org.codu.techpdf", callbacks); eripc_menu_add_group(eipccc, "GTest", "", "folder"); eripc_menu_add_item(eipccc, "Test", "GTest", "folder"); eripc_menu_add_menu(eipccc, "main", "GTest", NULL, NULL, NULL); eripc_menu_set_group_label(eipccc, "GTest", "GTest"); eripc_menu_set_item_label(eipccc, "Test", "GTest", "Test"); eripc_menu_show_menu(eipccc, "main"); ... } At this point I'm stumped, I'm sure I'm just missing some important call, but I haven't found it ... |
Advert | |
|
04-25-2010, 05:14 AM | #6 | |
Guru
Posts: 999
Karma: 19985
Join Date: Dec 2008
Location: Netherlands
Device: iRex DR1000S
|
Quote:
One of the differences I see is that you use org.codu. and I only use com.irexnet. with only the name of the application changed. Thats the only difference I see. |
|
04-25-2010, 11:28 AM | #7 | |
Connoisseur
Posts: 60
Karma: 151
Join Date: Apr 2010
Device: DR800SG
|
Quote:
|
|
04-25-2010, 01:57 PM | #8 | |
Guru
Posts: 999
Karma: 19985
Join Date: Dec 2008
Location: Netherlands
Device: iRex DR1000S
|
Quote:
Code:
eipccc = eripc_client_context_new( "techpdf", "0.1", "com.irexnet.techpdf", "/com/irexnet/techpdf", "com.irexnet.techpdf", callbacks); |
|
04-25-2010, 03:01 PM | #9 |
Connoisseur
Posts: 60
Karma: 151
Join Date: Apr 2010
Device: DR800SG
|
Yeah, that was ultimately the problem. Weird. (I ended up importing the hello-world IPC code anyway, just to cover all bases.)
|
Thread Tools | Search this Thread |
|
Similar Threads | ||||
Thread | Thread Starter | Forum | Replies | Last Post |
DR800 ANN: DR800+. Port of some DR1000 features to the DR800 | Iņigo | iRex | 274 | 04-05-2013 02:24 PM |
Installing dev environment | bran | iRex Developer's Corner | 13 | 09-28-2010 05:43 PM |
iLiad /dev/ttyS1? | -Thomas- | iRex Developer's Corner | 0 | 05-04-2008 07:16 PM |