~jcowgill/ubuntu/trusty/easytag/bug-1295882

« back to all changes in this revision

Viewing changes to src/bar.c

  • Committer: Bazaar Package Importer
  • Author(s): Sebastien Bacher
  • Date: 2006-04-15 15:47:47 UTC
  • mfrom: (1.2.2 upstream) (3.1.1 dapper)
  • Revision ID: james.westby@ubuntu.com-20060415154747-vr4eqoxwcrgs2ps1
* New upstream version:
  - New logo and icons,
  - Added ability to display all albums of an artist in the 'Artist / Album'
    view,
  - Added detection of the bugged version of id3lib when writting ID3 tag to 
    Unicode to inform the user (a patch for id3lib is supplied in package
    source),
  - For Ogg files, the field DESCRIPTION is also used for the comment,
  - Fixed stack corruption bugs in Fill Tag scanner,
  - Fixed loading disk number for FLAC tag,
  - Fixed error that displays MP3 files in red when no tag is present,
  - Fixed a crash in the CDDB window when getting tracks of a album,
  - Fixed playlist name bug when creating it in the parent directory,
  - Fixed manual CDDB search when using Squid,
  - Little fix for FLAC tags,
  - Fixed various bugs,
  - Russian translation updated,
  - Greek translation updated,
  - Spanish translation updated,
  - Japanese translation updated,
  - Czech translation updated,
  - Brazilian Portuguese translation updated
  - Danish translation updated,
  - Italian translation updated,
  - Hungarian translation updated,
  - German translation updated.

Show diffs side-by-side

added added

removed removed

Lines of Context:
1
1
/* bar.c - 2000/05/05 */
2
2
/*
3
3
 *  EasyTAG - Tag editor for MP3 and Ogg Vorbis files
4
 
 *  Copyright (C) 2000-2003  Jerome Couderc <j.couderc@ifrance.com>
 
4
 *  Copyright (C) 2000-2003  Jerome Couderc <easytag@gmail.com>
5
5
 *
6
6
 *  This program is free software; you can redistribute it and/or modify
7
7
 *  it under the terms of the GNU General Public License as published by
127
127
    GtkWidget *toolbar;
128
128
    GtkWidget *toolbarwidget;
129
129
 
130
 
    GtkActionEntry ActionEntries[] = {
 
130
    /*
 
131
     * Structure :
 
132
     *  - name
 
133
     *  - stock_id
 
134
     *  - label
 
135
     *  - accelerator
 
136
     *  - tooltip
 
137
     *  - callback
 
138
     */
 
139
    GtkActionEntry ActionEntries[] = 
 
140
    {
 
141
        
 
142
        /*
 
143
         * Main Menu Actions
 
144
         */
131
145
        { MENU_FILE, NULL, _("_File") },
132
146
 
133
147
        { MENU_FILE_SORT_TAG,                 GTK_STOCK_SORT_ASCENDING,  _("Sort list by tag") },
171
185
        { AM_SORT_ASCENDING_FILE_SAMPLERATE,  GTK_STOCK_SORT_ASCENDING,  _("Ascending by samplerate"),       NULL, _("Ascending by samplerate"),       G_CALLBACK(Menu_Sort_Action) },
172
186
        { AM_SORT_DESCENDING_FILE_SAMPLERATE, GTK_STOCK_SORT_DESCENDING, _("Descending by samplerate"),      NULL, _("Descending by samplerate"),      G_CALLBACK(Menu_Sort_Action) },
173
187
 
174
 
        { AM_BROWSE_FILE_WITH,   GTK_STOCK_OPEN,             _("Open File(s) with ..."),      NULL,                _("Open File(s) with ..."),     G_CALLBACK(Browser_Open_Run_Program_List_Window) },
 
188
        { AM_OPEN_FILE_WITH,     GTK_STOCK_OPEN,             _("Open File(s) with ..."),      NULL,                _("Open File(s) with ..."),     G_CALLBACK(Browser_Open_Run_Program_List_Window) },
175
189
        { AM_SELECT_ALL_FILES,   "easytag-select-all",       _("Select All Files"),           "<Control>A",        _("Select All Files"),          G_CALLBACK(Action_Select_All_Files) },
176
190
        { AM_UNSELECT_ALL_FILES, "easytag-unselect-all",     _("Unselect All Files"),         "<Shift><Control>A", _("Unselect All Files"),        G_CALLBACK(Action_Unselect_All_Files) },
177
191
        { AM_INVERT_SELECTION,   "easytag-invert-selection", _("Invert Files Selection"),     "<Control>I",        _("Invert Files Selection"),    G_CALLBACK(Action_Invert_Files_Selection) },
178
192
        { AM_DELETE_FILE,        GTK_STOCK_DELETE,           _("Delete File(s)"),             NULL,                _("Delete File(s)"),            G_CALLBACK(Action_Delete_Selected_Files) },
179
 
        { AM_FIRST,              GTK_STOCK_GOTO_FIRST,       _("_First File"),                "<Control>F",        _("First File"),                G_CALLBACK(Action_Select_First_File) },
180
 
        { AM_PREV,               GTK_STOCK_GO_BACK,          _("_Previous File"),             "<Control>P",        _("Previous File"),             G_CALLBACK(Action_Select_Prev_File) },
181
 
        { AM_NEXT,               GTK_STOCK_GO_FORWARD,       _("_Next File"),                 "<Control>N",        _("Next File"),                 G_CALLBACK(Action_Select_Next_File) },
182
 
        { AM_LAST,               GTK_STOCK_GOTO_LAST,        _("_Last File"),                 "<Control>L",        _("Last File"),                 G_CALLBACK(Action_Select_Last_File) },
 
193
        { AM_FIRST,              GTK_STOCK_GOTO_FIRST,       _("_First File"),                "<Control>Home",     _("First File"),                G_CALLBACK(Action_Select_First_File) },
 
194
        { AM_PREV,               GTK_STOCK_GO_BACK,          _("_Previous File"),             "Page_Up",           _("Previous File"),             G_CALLBACK(Action_Select_Prev_File) },
 
195
        { AM_NEXT,               GTK_STOCK_GO_FORWARD,       _("_Next File"),                 "Page_Down",         _("Next File"),                 G_CALLBACK(Action_Select_Next_File) },
 
196
        { AM_LAST,               GTK_STOCK_GOTO_LAST,        _("_Last File"),                 "<Control>End",      _("Last File"),                 G_CALLBACK(Action_Select_Last_File) },
183
197
        // XXX GTK1 version uses Ctrl+C for scanner, this doesnt work in GTK1 as its copy! in gtk2, behaviour is different
184
198
        // and binding Ctrl+C effectively stops the user copying text..
185
199
        { AM_SCAN,               "easytag-scan",             _("S_can File(s)"),              NULL,                _("Scan File(s)"),              G_CALLBACK(Action_Scan_Selected_Files) },
186
200
        { AM_REMOVE,             GTK_STOCK_CLEAR,            _("_Remove Tag(s)"),             "<Control>R",        _("Remove Tag(s)"),             G_CALLBACK(Action_Remove_Selected_Tags) },
187
 
        { AM_UNDO,               GTK_STOCK_UNDO,             _("_Undo Last File(s) Changes"), "<Control>U",        _("Undo Last File(s) Changes"), G_CALLBACK(Action_Undo_Selected_Files) },
188
 
        { AM_REDO,               GTK_STOCK_REDO,             _("R_edo Last File(s) Changes"), "<Control>E",        _("Redo Last File(s) Changes"), G_CALLBACK(Action_Redo_Selected_File) },
 
201
        { AM_UNDO,               GTK_STOCK_UNDO,             _("_Undo Last File(s) Changes"), "<Control>Z",        _("Undo Last File(s) Changes"), G_CALLBACK(Action_Undo_Selected_Files) },
 
202
        { AM_REDO,               GTK_STOCK_REDO,             _("R_edo Last File(s) Changes"), "<Shift><Control>Z", _("Redo Last File(s) Changes"), G_CALLBACK(Action_Redo_Selected_File) },
189
203
        { AM_SAVE,               GTK_STOCK_SAVE,             _("_Save File(s)"),              "<Control>S",        _("Save File(s)"),              G_CALLBACK(Action_Save_Selected_Files) },
190
 
        { AM_UNDO_HISTORY,       GTK_STOCK_UNDO,             _("Undo Last Changes"),          "<Alt><Control>U",   _("Undo Last Changes"),         G_CALLBACK(Action_Undo_From_History_List) },
191
 
        { AM_REDO_HISTORY,       GTK_STOCK_REDO,             _("Redo Last Changes"),          "<Alt><Control>R",   _("Redo Last Changes"),         G_CALLBACK(Action_Redo_From_History_List) },
 
204
        { AM_SAVE_FORCED,        GTK_STOCK_SAVE,             _("_Force Saving File(s)"),      "<Shift><Control>S", _("Force Saving File(s)"),      G_CALLBACK(Action_Force_Saving_Selected_Files) },
 
205
        { AM_UNDO_HISTORY,       GTK_STOCK_UNDO,             _("Undo Last Changes"),          NULL,                _("Undo Last Changes"),         G_CALLBACK(Action_Undo_From_History_List) },
 
206
        { AM_REDO_HISTORY,       GTK_STOCK_REDO,             _("Redo Last Changes"),          NULL,                _("Redo Last Changes"),         G_CALLBACK(Action_Redo_From_History_List) },
192
207
        { AM_QUIT,               GTK_STOCK_QUIT,             _("_Quit"),                      "<Control>Q",        _("Quit"),                      G_CALLBACK(Quit_MainWindow) },
193
208
 
194
209
        { MENU_BROWSER,                NULL,                   _("_Browser") },
195
 
        { AM_LOAD_HOME_DIR,            GTK_STOCK_HOME,         _("Go to _Home Directory"),         "<Control>H",        _("Go to Home Directory"),          G_CALLBACK(Browser_Load_Home_Directory) },
 
210
        { AM_LOAD_HOME_DIR,            GTK_STOCK_HOME,         _("Go to _Home Directory"),         "<Alt>Home",         _("Go to Home Directory"),          G_CALLBACK(Browser_Load_Home_Directory) },
196
211
        { AM_LOAD_DEFAULT_DIR,         GTK_STOCK_HARDDISK,     _("Go to _Default Directory"),      "<Control>D",        _("Go to Default Directory"),       G_CALLBACK(Browser_Load_Default_Directory) },
197
212
        { AM_SET_PATH_AS_DEFAULT,      GTK_STOCK_JUMP_TO,      _("Set _Current Path as Default"),  NULL,                _("Set Current Path as Default"),   G_CALLBACK(Set_Current_Path_As_Default) },
198
213
        { AM_TREE_OR_ARTISTALBUM_VIEW, "easytag-artist-album", _("Tree View | Artist-Album View"), NULL,                _("Tree View | Artist-Album View"), G_CALLBACK(Menu_Sort_Action) },
199
 
        { AM_RENAME_DIR,               GTK_STOCK_INDEX,        _("Rename Directory ..."),          "<Control><Shift>D", _("Rename Directory ..."),          G_CALLBACK(Browser_Open_Rename_Directory_Window) },
 
214
        { AM_RENAME_DIR,               GTK_STOCK_INDEX,        _("Rename Directory ..."),          "F2",                _("Rename Directory ..."),          G_CALLBACK(Browser_Open_Rename_Directory_Window) },
200
215
        { AM_RELOAD_DIRECTORY,         GTK_STOCK_REFRESH,      _("Reload Directory"),              "F5",                _("Reload Directory"),              G_CALLBACK(Browser_Reload_Directory) },
201
216
        { AM_BROWSE_DIRECTORY_WITH,    GTK_STOCK_EXECUTE,      _("Browse Directory with ..."),     NULL,                _("Browse Directory with ..."),     G_CALLBACK(Browser_Open_Run_Program_Tree_Window) },
202
217
        { AM_COLLAPSE_TREE,            NULL,                   _("_Collapse Tree"),                "<Control><Shift>C", _("_Collapse Tree"),                G_CALLBACK(Browser_Tree_Collapse) },
203
218
        { AM_INITIALIZE_TREE,          GTK_STOCK_REFRESH,      _("_Refresh Tree"),                 "<Control><Shift>R", _("_Refresh Tree"),                 G_CALLBACK(Browser_Tree_Rebuild) },
204
219
 
205
 
        { MENU_SCANNER,              NULL,           _("S_canner") },
206
 
        { AM_SCANNER_FILL_TAG,       "easytag-scan", _("_Fill Tag(s) ..."),      NULL, _("Fill Tag(s) ..."),       G_CALLBACK(Scan_Use_Fill_Tag_Scanner) },
207
 
        { AM_SCANNER_RENAME_FILE,    "easytag-scan", _("_Rename File(s) ..."),   NULL, _("Rename File(s) ..."),    G_CALLBACK(Scan_Use_Rename_File_Scanner) },
208
 
        { AM_SCANNER_PROCESS_FIELDS, "easytag-scan", _("_Process Field(s) ..."), NULL, _("Process Fields(s) ..."), G_CALLBACK(Scan_Use_Process_Fields_Scanner) },
209
 
 
210
 
        { MENU_MISC,            NULL,              _("_Misc") },
211
 
        { AM_SEARCH_FILE,       GTK_STOCK_FIND,    _("S_earch File(s) ..."),         "<Alt>E", _("Search File(s)..."),           G_CALLBACK(Open_Search_File_Window) },
212
 
        { AM_CDDB_SEARCH,       GTK_STOCK_CDROM,   _("_CDDB Search ..."),            NULL,     _("CDDB Search ..."),             G_CALLBACK(Open_Cddb_Window) },
213
 
        { AM_FILENAME_FROM_TXT, GTK_STOCK_OPEN,    _("Load Filenames from TXT ..."), "<Alt>T", _("Load Filenames from TXT ..."), G_CALLBACK(Open_Load_Filename_Window) },
214
 
        { AM_WRITE_PLAYLIST,    GTK_STOCK_SAVE_AS, _("Write Playlist ..."),          "<Alt>W", _("Write Playlist ..."),          G_CALLBACK(Open_Write_Playlist_Window) },
215
 
        { AM_RUN_AUDIO_PLAYER,  "easytag-sound",   _("Run Audio Player"),            "<Alt>X", _("Run Audio Player"),            G_CALLBACK(Run_Audio_Player_Using_Selection) },
216
 
 
217
 
        { MENU_SETTINGS,          NULL,                  _("_Settings") },
218
 
        { AM_OPEN_OPTIONS_WINDOW, GTK_STOCK_PREFERENCES, _("_Preferences ..."),         "<Alt>P", _("Preferences ..."),         G_CALLBACK(Open_OptionsWindow) },
219
 
        { AM_SAVE_CONFIG,         GTK_STOCK_SAVE,        _("Save _Configuration Now"),  "<Alt>C", _("Save Configuration Now"),  G_CALLBACK(Save_Config_Now) },
220
 
 
221
 
        { MENU_HELP,            NULL,           _("_Help") },
222
 
        { AM_OPEN_ABOUT_WINDOW, GTK_STOCK_HELP, _("_About"), "<Alt>A", _("About"), G_CALLBACK(Show_About_Window) },
223
 
 
224
 
        /* Following items are on toolbar but not on menu */
 
220
        { MENU_SCANNER,              NULL,                  _("S_canner") },
 
221
        { AM_SCANNER_FILL_TAG,       "easytag-scan",        _("_Fill Tag(s) ..."),                  NULL,         _("Fill Tag(s) ..."),                 G_CALLBACK(Scan_Use_Fill_Tag_Scanner) },
 
222
        { AM_SCANNER_RENAME_FILE,    "easytag-scan",        _("_Rename File(s) and Directory ..."), NULL,         _("Rename File(s) and Directory ..."),G_CALLBACK(Scan_Use_Rename_File_Scanner) },
 
223
        { AM_SCANNER_PROCESS_FIELDS, "easytag-scan",        _("_Process Field(s) ..."),             NULL,         _("Process Fields(s) ..."),           G_CALLBACK(Scan_Use_Process_Fields_Scanner) },
 
224
 
 
225
        { MENU_MISC,                NULL,                   _("_Misc") },
 
226
        { AM_SEARCH_FILE,           GTK_STOCK_FIND,         _("Search _File(s) ..."),               "<Control>F", _("Search File(s)..."),               G_CALLBACK(Open_Search_File_Window) },
 
227
        { AM_CDDB_SEARCH,           GTK_STOCK_CDROM,        _("_CD Data Base Search ..."),          NULL,         _("CDDB Search ..."),                 G_CALLBACK(Open_Cddb_Window) },
 
228
        { AM_FILENAME_FROM_TXT,     GTK_STOCK_OPEN,         _("Load Filenames from TXT ..."),       "<Alt>T",     _("Load Filenames from TXT ..."),     G_CALLBACK(Open_Load_Filename_Window) },
 
229
        { AM_WRITE_PLAYLIST,        GTK_STOCK_SAVE_AS,      _("Write Playlist ..."),                "<Alt>W",     _("Write Playlist ..."),              G_CALLBACK(Open_Write_Playlist_Window) },
 
230
        { AM_RUN_AUDIO_PLAYER,      "easytag-sound",        _("Run Audio Player"),                  "<Alt>X",     _("Run Audio Player"),                G_CALLBACK(Run_Audio_Player_Using_Selection) },
 
231
 
 
232
        { MENU_SETTINGS,            NULL,                   _("_Settings") },
 
233
        { AM_OPEN_OPTIONS_WINDOW,   GTK_STOCK_PREFERENCES,  _("_Preferences ..."),                  "<Alt>P",     _("Preferences ..."),                 G_CALLBACK(Open_OptionsWindow) },
 
234
 
 
235
        { MENU_HELP,                NULL,                   _("_Help") },
 
236
        { AM_OPEN_ABOUT_WINDOW,     GTK_STOCK_HELP,         _("_About"),                            NULL,         _("About"),                           G_CALLBACK(Show_About_Window) },
 
237
 
 
238
 
 
239
        /*
 
240
         * Following items are on toolbar but not on menu
 
241
         */
225
242
        { AM_STOP, GTK_STOCK_STOP, _("Stop the current action"), NULL, _("Stop the current action"), G_CALLBACK(Action_Main_Stop_Button_Pressed) },
226
243
 
227
 
        /* Popup menu's */
228
 
        { POPUP_FILE,            NULL,              _("_File Operations") },
229
 
        { POPUP_SUBMENU_SCANNER, "easytag-scan",    _("S_canner") },
230
 
        { POPUP_DIR_RUN_AUDIO,   GTK_STOCK_EXECUTE, _("Run Audio Player"),           "<Alt>X", _("Run Audio Player"),           G_CALLBACK(Run_Audio_Player_Using_Directory) },
231
244
 
 
245
        /*
 
246
         * Popup menu's Actions
 
247
         */
 
248
        { POPUP_FILE,                   NULL,              _("_File Operations") },
 
249
        { POPUP_SUBMENU_SCANNER,        "easytag-scan",    _("S_canner") },
 
250
        { POPUP_DIR_RUN_AUDIO,          "easytag-sound",   _("Run Audio Player"),          NULL, _("Run Audio Player"),        G_CALLBACK(Run_Audio_Player_Using_Directory) },
 
251
        { AM_ARTIST_RUN_AUDIO_PLAYER,   "easytag-sound",   _("Run Audio Player"),          NULL, _("Run Audio Player"),        G_CALLBACK(Run_Audio_Player_Using_Browser_Artist_List) },
 
252
        { AM_ALBUM_RUN_AUDIO_PLAYER,    "easytag-sound",   _("Run Audio Player"),          NULL, _("Run Audio Player"),        G_CALLBACK(Run_Audio_Player_Using_Browser_Album_List)  },
 
253
        { AM_CDDB_SEARCH_FILE,          GTK_STOCK_CDROM,   _("CDDB Search File(s)..."),    NULL, _("CDDB Search File(s)..."),  G_CALLBACK(Cddb_Popup_Menu_Search_Selected_File) },
 
254
        //{ 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???) },
 
255
        //{ 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???) },
232
256
    };
233
257
 
234
 
    GtkToggleActionEntry ToggleActionEntries[] = {
235
 
        { AM_RECURSE,         GTK_STOCK_INDEX,        _("Browse _Sub-directories"),                         NULL, _("Browse _Sub-directories"),                          NULL,                                    FALSE },
236
 
        { 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 },
 
258
    GtkToggleActionEntry ToggleActionEntries[] = 
 
259
    {
 
260
        { AM_BROWSE_SUBDIR,      GTK_STOCK_INDEX,        _("Browse _Sub-directories"),                         NULL, _("Browse _Sub-directories"),                         NULL,                                    FALSE },
 
261
#ifndef WIN32 // No sense here for Win32, "hidden" means : starts with a '.'
 
262
        { AM_BROWSER_HIDDEN_DIR, NULL,                   _("Show Hidden Directories"),                         NULL, _("Show Hidden Directories"),                         G_CALLBACK(Browser_Tree_Rebuild),     FALSE },
 
263
#endif
 
264
        { 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 },
237
265
    };
238
266
 
239
267
    GError *error = NULL;
268
296
    gtk_action_group_add_toggle_actions(ActionGroup, ToggleActionEntries, num_toggle_entries, NULL);
269
297
 
270
298
    UIManager = gtk_ui_manager_new();
271
 
    if (!gtk_ui_manager_add_ui_from_string (UIManager, ui_xml, -1, &error))
 
299
    if (!gtk_ui_manager_add_ui_from_string(UIManager, ui_xml, -1, &error))
272
300
    {
273
301
        g_error(_("Could not merge UI, error was: %s\n"), error->message);
274
302
        g_error_free(error);
275
303
    }
276
 
 
277
304
    gtk_ui_manager_insert_action_group(UIManager, ActionGroup, 0);
278
305
    gtk_window_add_accel_group(GTK_WINDOW(MainWindow), gtk_ui_manager_get_accel_group(UIManager));
279
 
    /* Menu is placed in a handlebar */
280
 
    menubar = gtk_handle_box_new();
281
 
    gtk_container_add(GTK_CONTAINER(menubar), gtk_ui_manager_get_widget(UIManager, "/MenuBar"));
 
306
 
 
307
    /* Menu (not placed in a handlebar) */
 
308
    menubar = gtk_ui_manager_get_widget(UIManager, "/MenuBar");
282
309
    Init_Menu_Bar();
283
310
    gtk_widget_show_all(menubar);
284
311
 
286
313
    toolbar = gtk_handle_box_new();
287
314
    toolbarwidget = gtk_ui_manager_get_widget(UIManager, "/ToolBar");
288
315
    gtk_container_add(GTK_CONTAINER(toolbar), toolbarwidget);
289
 
    //gtk_container_set_border_width(GTK_CONTAINER(toolbarwidget),2);
290
316
    gtk_toolbar_set_style(GTK_TOOLBAR(toolbarwidget), GTK_TOOLBAR_ICONS);
291
317
    Set_Tips_Color(GTK_TOOLBAR(toolbarwidget)->tooltips);
292
318
    gtk_widget_show_all(toolbar);
309
335
            G_CALLBACK(Check_Menu_Item_Toggled_Browse_Subdir),NULL);
310
336
    }
311
337
 
 
338
    CheckMenuItemBrowseHiddenDirMainMenu = gtk_ui_manager_get_widget(UIManager, "/MenuBar/BrowserMenu/BrowseHiddenDir");
 
339
    if (CheckMenuItemBrowseHiddenDirMainMenu)
 
340
    {
 
341
        gtk_check_menu_item_set_active(GTK_CHECK_MENU_ITEM(CheckMenuItemBrowseHiddenDirMainMenu),BROWSE_HIDDEN_DIR);
 
342
        g_signal_connect(G_OBJECT(CheckMenuItemBrowseHiddenDirMainMenu),"toggled",
 
343
            G_CALLBACK(Check_Menu_Item_Toggled_Browse_Hidden_Dir),NULL);
 
344
    }
 
345
 
312
346
    /* If entry not implemented */
313
347
    //{GtkWidget *widget = gtk_item_factory_get_widget_by_action(ItemFactory,FILENAME_FROM_TXT);
314
348
    //if (widget) gtk_widget_set_sensitive(widget,FALSE);}
327
361
    gtk_check_menu_item_set_active(GTK_CHECK_MENU_ITEM(CheckMenuItemBrowseSubdirMainMenu),BROWSE_SUBDIR);
328
362
}
329
363
 
 
364
/*
 
365
 * Callback to update state of check button to show hiddendirectories into menu
 
366
 */
 
367
void Check_Menu_Item_Toggled_Browse_Hidden_Dir (GtkWidget *checkmenuitem)
 
368
{
 
369
    BROWSE_HIDDEN_DIR = GTK_CHECK_MENU_ITEM(checkmenuitem)->active;
 
370
    Check_Menu_Item_Update_Browse_Hidden_Dir();
 
371
 
 
372
    // Reload directory, in case we have changed BROWSE_HIDDEN_DIR
 
373
    Browser_Tree_Rebuild(NULL);
 
374
}
 
375
void Check_Menu_Item_Update_Browse_Hidden_Dir (void)
 
376
{
 
377
#ifndef WIN32
 
378
    gtk_check_menu_item_set_active(GTK_CHECK_MENU_ITEM(CheckMenuItemBrowseHiddenDirMainMenu),BROWSE_HIDDEN_DIR);
 
379
#endif
 
380
}
 
381
 
330
382
 
331
383
 
332
384