Re[patch]: xfce4 gtkspinbutton error

edscott wilson garcia edscott at prodigy.net.mx
Tue Oct 7 02:13:11 CEST 2003


On Mon, 2003-10-06 at 16:05, Francois Le Clainche wrote:
> Le lundi 06 octobre 2003 à 16:31, edscott wilson garcia a écrit:
> 
> > Or it could be that with gtk 2.2.3/2.2.4 the gtk_getentrytext_function
> > does not return "" but NULL. Patch:
> > 
> > ---
> > /usr/home/common/CVS/sourceforge/xfce/xfce-devel/xffm-1/libs/input.c	Thu
> > Oct  2 11:47:40 2003
> > +++ /home/common/CVS/sourceforge/xfce/xfce-devel/xffm/libs/input.c	Mon
> > Oct  6 11:04:56 2003
> > @@ -355,7 +355,7 @@
> >      print_status(treeview,NULL," ",NULL);
> >      entry = (GtkEntry *) lookup_widget(tree_details->window,
> > "input_entry");
> >      choice = g_strdup((gchar *)gtk_entry_get_text(entry));
> > -    g_strstrip(choice);
> > +    if (choice) g_strstrip(choice);
> >      hideit(tree_details->window, "input_box");
> >      if(tree_details->preferences & SHOW_F)
> >  	showit(tree_details->window, "filter_box");
> 
> Hi Edscott,
> 
> Hm... no success.
> 
> I attach a "debug" file. Not sure that helps.
> It happens each time I try to launch an app from the xffm applications
> tree.
> 

Backtrace helps so I can reproduce the bug. The problem is a dumb
mistake in the code, really. Here is the fix:

--- /usr/home/common/CVS/sourceforge/xfce/xfce-devel/xffm-1/libs/run.c 
Thu Oct  2 11:10:08 2003
+++ /home/common/CVS/sourceforge/xfce/xfce-devel/xffm/libs/run.c       
Mon Oct  6 18:57:38 2003
@@ -524,8 +524,8 @@
     
      /* filter element is double used for arguments here */
     if (IS_APP_TYPE(en->type) && en->filter) a=g_strconcat(en->path,"
",en->filter,NULL);
-    else if (IS_EXE(en->type)) a=NULL;
-    else a=g_strdup(en->path);
+    else if (IS_APP_TYPE(en->type) || IS_EXE(en->type))
a=g_strdup(en->path);
+    else return;
    
     print_status(tree_details->treeview, "xf_INFO_ICON",
                   _("Executing"), " : ", 
bash-2.05b$ 

> Let me know if I can do more.

Thanks for your help. BTW, the current CVS version of xffm (frozen
sourceforge version) will drop a core file to
$HOME/.xfce4/xffm/xffm.core if it crashes or aborts so that a backtrace
can be obtained with:

$gdb -c  $HOME/.xfce4/xffm/xffm.core  xffm


regards,

Edscott
> 
> Regards
> François






More information about the Xfce4-dev mailing list