Re: [Easytag-mailing] Glib Error On start-up



Hi,

   This is due to a problem of initializing in the menu.
The attached patch fixes the problem.

Regards,
Jerome


alkos333 wrote, the 06.04.2007 20:36 :
Could somebody please take a look at the output that I get when I try to run easytag?

http://www.linuxquestions.org/questions/showthread.php?t=541643 <http://www.linuxquestions.org/questions/showthread.php?t=541643>


Any ideas, or suggestions will be greatly appreciated.

diff -ruN easytag-2.0.orig/src/bar.c easytag-2.0/src/bar.c
--- easytag-2.0.orig/src/bar.c	2007-02-07 23:27:58.000000000 +0100
+++ easytag-2.0/src/bar.c	2007-04-06 21:57:52.000000000 +0200
@@ -253,13 +253,14 @@
         { AM_CDDB_SEARCH_FILE,          GTK_STOCK_CDROM,   _("CDDB Search File(s)..."),    NULL, _("CDDB Search File(s)..."),  G_CALLBACK(Cddb_Popup_Menu_Search_Selected_File) },
         //{ AM_ARTIST_OPEN_FILE_WITH,     GTK_STOCK_OPEN,    _("Open File(s) with ..."),     NULL, _("Open File(s) with ..."),     G_CALLBACK(Browser_Open_Run_Program_List_Window??? Browser_Open_Run_Program_Tree_Window???) },
         //{ AM_ALBUM_OPEN_FILE_WITH,      GTK_STOCK_OPEN,    _("Open File(s) with ..."),     NULL, _("Open File(s) with ..."),     G_CALLBACK(Browser_Open_Run_Program_List_Window??? Browser_Open_Run_Program_Tree_Window???) },
+
     };
 
     GtkToggleActionEntry ToggleActionEntries[] =
     {
-        { AM_BROWSE_SUBDIR,      GTK_STOCK_INDEX,        _("Browse _Sub-directories"),                         NULL, _("Browse _Sub-directories"),                         NULL,                                    FALSE },
+        { AM_BROWSE_SUBDIR,      NULL,                   _("Browse _Sub-directories"),                         NULL, _("Browse _Sub-directories"),                         NULL,                                    BROWSE_SUBDIR },
 #ifndef WIN32 // No sense here for Win32, "hidden" means : starts with a '.'
-        { AM_BROWSER_HIDDEN_DIR, NULL,                   _("Show Hidden Directories"),                         NULL, _("Show Hidden Directories"),                         G_CALLBACK(Browser_Tree_Rebuild),     FALSE },
+        { AM_BROWSER_HIDDEN_DIR, NULL,                   _("Show Hidden Directories"),                         NULL, _("Show Hidden Directories"),                         G_CALLBACK(Browser_Tree_Rebuild),     BROWSE_HIDDEN_DIR },
 #endif
         { AM_VIEWMODE_TOGGLE,    "easytag-artist-album", _("Show tree browser / Display by Artist and Album"), NULL, _("Show tree browser / Display by Artist and Album"), G_CALLBACK(Action_Select_Browser_Style), FALSE },
     };
@@ -329,7 +330,7 @@
     CheckMenuItemBrowseSubdirMainMenu = gtk_ui_manager_get_widget(UIManager, "/MenuBar/BrowserMenu/BrowseSubdir");
     if (CheckMenuItemBrowseSubdirMainMenu)
     {
-        gtk_check_menu_item_set_active(GTK_CHECK_MENU_ITEM(CheckMenuItemBrowseSubdirMainMenu),BROWSE_SUBDIR);
+        // Link to update BROWSE_SUBDIR when changed
         g_signal_connect(G_OBJECT(CheckMenuItemBrowseSubdirMainMenu),"toggled",
             G_CALLBACK(Check_Menu_Item_Toggled_Browse_Subdir),NULL);
     }
@@ -337,7 +338,7 @@
     CheckMenuItemBrowseHiddenDirMainMenu = gtk_ui_manager_get_widget(UIManager, "/MenuBar/BrowserMenu/BrowseHiddenDir");
     if (CheckMenuItemBrowseHiddenDirMainMenu)
     {
-        gtk_check_menu_item_set_active(GTK_CHECK_MENU_ITEM(CheckMenuItemBrowseHiddenDirMainMenu),BROWSE_HIDDEN_DIR);
+        // Link to update BROWSE_HIDDEN_DIR when changed
         g_signal_connect(G_OBJECT(CheckMenuItemBrowseHiddenDirMainMenu),"toggled",
             G_CALLBACK(Check_Menu_Item_Toggled_Browse_Hidden_Dir),NULL);
     }
@@ -369,7 +370,7 @@
     Check_Menu_Item_Update_Browse_Hidden_Dir();
 
     // Reload directory, in case we have changed BROWSE_HIDDEN_DIR
-    Browser_Tree_Rebuild(NULL);
+    //Browser_Tree_Rebuild(NULL); // Commented, as already done in GtkToggleActionEntry for AM_BROWSER_HIDDEN_DIR
 }
 void Check_Menu_Item_Update_Browse_Hidden_Dir (void)
 {


[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]