/[xlog]/xlog/src/callbacks_preferencesdialog.c
ViewVC logotype

Diff of /xlog/src/callbacks_preferencesdialog.c

Parent Directory Parent Directory | Revision Log Revision Log | View Patch Patch

revision 1.24 by pa4tu, Wed Aug 27 17:17:15 2003 UTC revision 1.25 by pa4tu, Wed Oct 1 12:14:52 2003 UTC
# Line 141  set_theme (gchar * color, gchar * font, Line 141  set_theme (gchar * color, gchar * font,
141  static void  static void
142  set_path (gchar * pathstr)  set_path (gchar * pathstr)
143  {  {
         gchar *str, *fpathstr;  
         GString *path;  
   
144          if (strlen (pathstr) > 0)          if (strlen (pathstr) > 0)
145          {          {
146                  path = g_string_new (pathstr);                  if (g_ascii_strcasecmp (preferences.savedir, pathstr))
147                  str = g_strdup (path->str);                          preferences.savedir = g_strdup (pathstr);
                 /* remove trailing slash */  
                 g_strreverse (str);  
                 if (!g_ascii_strncasecmp (str, "/", 1))  
                 {  
                         path = g_string_erase (path, (path->len) - 1, 1);  
                 }  
                 else            /* in case a file is selected */  
                 {  
                         fpathstr = g_strdup (path->str);  
                         path = g_string_new (dirname (fpathstr));  
                         g_free (fpathstr);  
                 }  
                 g_free (str);  
                 if (g_ascii_strcasecmp (preferences.savedir, path->str))  
                         preferences.savedir = g_strdup (path->str);  
                 g_string_free (path, TRUE);  
148          }          }
149  }  }
150    
# Line 687  on_pathbutton_clicked (GtkButton * butto Line 668  on_pathbutton_clicked (GtkButton * butto
668          GtkWidget *pathselection;          GtkWidget *pathselection;
669    
670          pathselection = create_pathselection ();          pathselection = create_pathselection ();
671          gtk_editable_set_editable (GTK_EDITABLE          gtk_editable_set_editable (GTK_EDITABLE
672                                     (GTK_FILE_SELECTION (pathselection)->      (GTK_FILE_SELECTION (pathselection)-> selection_entry), FALSE);
673                                      selection_entry), FALSE);    gtk_widget_set_sensitive
674        (GTK_FILE_SELECTION (pathselection)->file_list, FALSE);
675      
676          gtk_widget_set_sensitive (preferencesdialog, 0);          gtk_widget_set_sensitive (preferencesdialog, 0);
677          gtk_widget_show (pathselection);          gtk_widget_show (pathselection);
678  }  }

Legend:
Removed from v.1.24  
changed lines
  Added in v.1.25

savannah-hackers-public@gnu.org
ViewVC Help
Powered by ViewVC 1.1.26