Aw: Re: New panel in trunk

Fabian Nowak timystery at arcor.de
Thu Oct 13 17:44:05 CEST 2005


hmm, launcher is still not better than before. try this:

:~/tmp/xfce4-panel/plugins/launcher$ diff launcher.c launcher_fabian.c 
801a802,803
>     else 
>         entry->name = g_strdup ("");
804a807,808
>     else
>         entry->exec = g_strdup ("");
811a816,817
>     else 
>         entry->comment = g_strdup ("");
812a819,821
> /* be careful: what about having no icon specified? it will try
>     to read x-fce-icon-category!
>     so FIXME! */


Works.


Am Donnerstag, den 13.10.2005, 14:45 +0200 schrieb Jasper Huijsmans:
> Fabian Nowak schreef:
> > Am Donnerstag, den 13.10.2005, 13:47 +0200 schrieb Jasper Huijsmans:
> > 
> >>Fabian Nowak schreef:
> >>
> >>>panel just crashed after having inserted misspelled item
> >>
> >>That really makes no sense to me.
> > 
> > 
> > hmm, forgot some words?: ...item command and executing the item.
> > 
> 
> Yeah. I meant that it makes no sense to me that this would give a crash.
> 
> > 
> >>>xfce-settings-show and tried to execute. after restarting the panel, the
> >>>launcher was still there and popped up the expected dialog when
> >>>executing.
> >>>
> >>>hehe, same happens when inserting a new item with invalid command into
> >>>launcher.
> >>
> 
> When exactly does the crash happen? When you switch focus on the entry, 
> when you close the dialog, or something else?
oh, when executing the button or menu entry with the misspelled command.
try adding a starter with command "sdfgser" and close the dialog and
execute afterwards the newly added starter.

> 
> >>Backtrace?
> > 
> > 
> > 
> > Program received signal SIGSEGV, Segmentation fault.
> > [Switching to Thread -1217968448 (LWP 3634)]
> > 0xb7987cf3 in g_type_check_instance_cast ()
> > from /usr/lib/libgobject-2.0.so.0
> > (gdb) bt
> > #0  0xb7987cf3 in g_type_check_instance_cast ()
> >    from /usr/lib/libgobject-2.0.so.0
> > #1  0xb74487c6 in icon_menu_deactivated (menu=0x8300f40, ld=0x4c0a)
> >     at launcher-dialog.c:279
> 
> This is called when the icon menu is closed. The pointer addresses both 
> are too short, so there certainly seems to be a problem here.
> 
> > #2  0xb79796ab in g_cclosure_marshal_VOID__VOID ()
> >    from /usr/lib/libgobject-2.0.so.0
> > #3  0xb796d67b in g_closure_invoke () from /usr/lib/libgobject-2.0.so.0
> > #4  0xb797cc9d in g_signal_stop_emission ()
> > from /usr/lib/libgobject-2.0.so.0
> > #5  0xb797e077 in g_signal_emit_valist ()
> > from /usr/lib/libgobject-2.0.so.0
> > #6  0xb797e42e in g_signal_emit () from /usr/lib/libgobject-2.0.so.0
> > #7  0xb7c16318 in gtk_menu_shell_deactivate ()
> > from /usr/lib/libgtk-x11-2.0.so.0
> > #8  0xb7c178e5 in _gtk_menu_shell_select_last ()
> >    from /usr/lib/libgtk-x11-2.0.so.0
> > #9  0xb79796ab in g_cclosure_marshal_VOID__VOID ()
> >    from /usr/lib/libgobject-2.0.so.0
> > #10 0xb796cfd8 in g_cclosure_new_swap ()
> > from /usr/lib/libgobject-2.0.so.0
> > #11 0xb796d67b in g_closure_invoke () from /usr/lib/libgobject-2.0.so.0
> > #12 0xb797cea2 in g_signal_stop_emission ()
> > from /usr/lib/libgobject-2.0.so.0
> > #13 0xb797e077 in g_signal_emit_valist ()
> > from /usr/lib/libgobject-2.0.so.0
> > #14 0xb797e42e in g_signal_emit () from /usr/lib/libgobject-2.0.so.0
> > #15 0xb7c17a28 in gtk_menu_shell_cancel ()
> > from /usr/lib/libgtk-x11-2.0.so.0
> > #16 0xb7c129ed in gtk_menu_get_for_attach_widget ()
> >    from /usr/lib/libgtk-x11-2.0.so.0
> > #17 0xb7979750 in g_cclosure_marshal_VOID__BOOLEAN ()
> > ---Type <return> to continue, or q <return> to quit---
> >    from /usr/lib/libgobject-2.0.so.0
> > #18 0xb796cfd8 in g_cclosure_new_swap ()
> > from /usr/lib/libgobject-2.0.so.0
> > #19 0xb796d67b in g_closure_invoke () from /usr/lib/libgobject-2.0.so.0
> > #20 0xb797c546 in g_signal_stop_emission ()
> > from /usr/lib/libgobject-2.0.so.0
> > #21 0xb797e077 in g_signal_emit_valist ()
> > from /usr/lib/libgobject-2.0.so.0
> > #22 0xb797e42e in g_signal_emit () from /usr/lib/libgobject-2.0.so.0
> > 
> > 
> >>#23 0xb7ce6e87 in _gtk_widget_grab_notify () from /usr/lib/libgtk-x11-2.0.so.0
> > 
> 
> This seems to be totally unrelated :( It's the error dialog when you run 
> an invalid program.
> 
> > #24 0xb7c063b9 in gtk_false () from /usr/lib/libgtk-x11-2.0.so.0
> > #25 0xb7b4c67c in gtk_bin_get_type () from /usr/lib/libgtk-x11-2.0.so.0
> > #26 0xb7b862e9 in gtk_container_foreach ()
> > from /usr/lib/libgtk-x11-2.0.so.0
> > #27 0xb7c064f1 in gtk_false () from /usr/lib/libgtk-x11-2.0.so.0
> > #28 0xb7cf68e8 in gtk_window_get_position ()
> > from /usr/lib/libgtk-x11-2.0.so.0
> > #29 0xb79796ab in g_cclosure_marshal_VOID__VOID ()
> >    from /usr/lib/libgobject-2.0.so.0
> > #30 0xb796cfd8 in g_cclosure_new_swap ()
> > from /usr/lib/libgobject-2.0.so.0
> > #31 0xb796d67b in g_closure_invoke () from /usr/lib/libgobject-2.0.so.0
> > #32 0xb797c546 in g_signal_stop_emission ()
> > from /usr/lib/libgobject-2.0.so.0
> > #33 0xb797e077 in g_signal_emit_valist ()
> > from /usr/lib/libgobject-2.0.so.0
> > #34 0xb797e42e in g_signal_emit () from /usr/lib/libgobject-2.0.so.0
> > #35 0xb7ce5362 in gtk_widget_show () from /usr/lib/libgtk-x11-2.0.so.0
> > #36 0xb7b98b79 in gtk_dialog_run () from /usr/lib/libgtk-x11-2.0.so.0
> > #37 0xb7dc6c6e in xfce_message_dialog (parent=0x0, 
> >     title=0xb73acf7e "Xfce Panel", icon_id=0xb744bd93
> > "gtk-dialog-error", 
> >     primary_text=0x828ef90 "Konnte \"Neues Item\" nicht ausführen.", 
> > ---Type <return> to continue, or q <return> to quit---
> >     secondary_text=0x830cb60 "Kindprozess »wet« konnte nicht
> > ausgeführt werden (Datei oder Verzeichnis nicht gefunden)", 
> >     first_button_type=0xb744bd89 "gtk-close") at dialogs.c:713
> > #38 0xb7446800 in launcher_entry_exec (entry=Variable "entry" is not
> > available.
> > ) at launcher.c:312
> 
> Weird. Variable not available. I've never seen that.
> 
> > #39 0xb79796ab in g_cclosure_marshal_VOID__VOID ()
> >    from /usr/lib/libgobject-2.0.so.0
> > #40 0xb796d67b in g_closure_invoke () from /usr/lib/libgobject-2.0.so.0
> > #41 0xb797cc9d in g_signal_stop_emission ()
> > from /usr/lib/libgobject-2.0.so.0
> > #42 0xb797e077 in g_signal_emit_valist ()
> > from /usr/lib/libgobject-2.0.so.0
> > #43 0xb797e42e in g_signal_emit () from /usr/lib/libgobject-2.0.so.0
> > #44 0xb7b510a8 in gtk_button_clicked ()
> > from /usr/lib/libgtk-x11-2.0.so.0
> > #45 0xb7b52969 in _gtk_button_set_depressed ()
> > from /usr/lib/libgtk-x11-2.0.so.0
> > #46 0xb79796ab in g_cclosure_marshal_VOID__VOID ()
> >    from /usr/lib/libgobject-2.0.so.0
> > #47 0xb796cfd8 in g_cclosure_new_swap ()
> > from /usr/lib/libgobject-2.0.so.0
> > #48 0xb796d67b in g_closure_invoke () from /usr/lib/libgobject-2.0.so.0
> > #49 0xb797c546 in g_signal_stop_emission ()
> > from /usr/lib/libgobject-2.0.so.0
> > #50 0xb797e077 in g_signal_emit_valist ()
> > from /usr/lib/libgobject-2.0.so.0
> > #51 0xb797e42e in g_signal_emit () from /usr/lib/libgobject-2.0.so.0
> > #52 0xb7b51018 in gtk_button_released ()
> > from /usr/lib/libgtk-x11-2.0.so.0
> > 
> > #53 0xb7b51f7c in _gtk_button_paint () from /usr/lib/libgtk-x11-2.0.so.0
> > #54 0xb7c08d85 in _gtk_marshal_BOOLEAN__BOXED ()
> >    from /usr/lib/libgtk-x11-2.0.so.0
> > #55 0xb796cfd8 in g_cclosure_new_swap ()
> > from /usr/lib/libgobject-2.0.so.0
> > ---Type <return> to continue, or q <return> to quit---
> > #56 0xb796d67b in g_closure_invoke () from /usr/lib/libgobject-2.0.so.0
> > #57 0xb797cea2 in g_signal_stop_emission ()
> > from /usr/lib/libgobject-2.0.so.0
> > #58 0xb797de35 in g_signal_emit_valist ()
> > from /usr/lib/libgobject-2.0.so.0
> > #59 0xb797e42e in g_signal_emit () from /usr/lib/libgobject-2.0.so.0
> > #60 0xb7ce6568 in gtk_widget_activate ()
> > from /usr/lib/libgtk-x11-2.0.so.0
> > #61 0xb7c072d9 in gtk_propagate_event ()
> > from /usr/lib/libgtk-x11-2.0.so.0
> > #62 0xb7c07739 in gtk_main_do_event () from /usr/lib/libgtk-x11-2.0.so.0
> > #63 0xb7a9f44a in _gdk_events_queue () from /usr/lib/libgdk-x11-2.0.so.0
> > #64 0xb78f9421 in g_main_context_dispatch ()
> > from /usr/lib/libglib-2.0.so.0
> > #65 0xb78fc687 in g_main_context_check () from /usr/lib/libglib-2.0.so.0
> > #66 0xb78fcbd8 in g_main_loop_run () from /usr/lib/libglib-2.0.so.0
> > #67 0xb7c06989 in gtk_main () from /usr/lib/libgtk-x11-2.0.so.0
> > #68 0x0804f44e in panel_app_run (argc=1, argv=0xbff2ee74) at
> > panel-app.c:436
> > #69 0x0804ecf0 in main (argc=1, argv=0xbff2ee74) at main.c:164
> > 
> > 
> >>>got the impression you check for unknown commands only when reading the
> >>>config files?
> >>
> >>As far as I know, I don't check anything...
> >>
> >>	Jasper

true. there is no signal handler registered:


launcher_dialog_response (OK) ->  launcher_save(plugin , launcher) ->
launcher_write_rc_file (..) -> 

i suggest adding 

g_signal_connect (mi, "activate", G_CALLBACK
(launcher_menu_item_activate), entry); to launcher_save() after writing
the rc file.

then you have the signal handler. but i'm too lazy to search around on
whether plugin or launcher has this 'entry' to be given as parameter.

> >>_______________________________________________
> >>Xfce4-dev mailing list
> >>Xfce4-dev at xfce.org
> >>http://foo-projects.org/mailman/listinfo/xfce4-dev
> > 
> > 
> > _______________________________________________
> > Xfce4-dev mailing list
> > Xfce4-dev at xfce.org
> > http://foo-projects.org/mailman/listinfo/xfce4-dev
> 
> _______________________________________________
> Xfce4-dev mailing list
> Xfce4-dev at xfce.org
> http://foo-projects.org/mailman/listinfo/xfce4-dev




More information about the Xfce4-dev mailing list