Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Allowed hiding menu bar #7

Closed
wants to merge 1 commit into from
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 1 addition & 0 deletions libnemo-private/nemo-global-preferences.h
Original file line number Diff line number Diff line change
Expand Up @@ -90,6 +90,7 @@ typedef enum
#define NEMO_WINDOW_STATE_START_WITH_STATUS_BAR "start-with-status-bar"
#define NEMO_WINDOW_STATE_START_WITH_SIDEBAR "start-with-sidebar"
#define NEMO_WINDOW_STATE_START_WITH_TOOLBAR "start-with-toolbar"
#define NEMO_WINDOW_STATE_START_WITH_MENU_BAR "start-with-menu-bar"
#define NEMO_WINDOW_STATE_SIDE_PANE_VIEW "side-pane-view"
#define NEMO_WINDOW_STATE_GEOMETRY "geometry"
#define NEMO_WINDOW_STATE_MAXIMIZED "maximized"
Expand Down
5 changes: 5 additions & 0 deletions libnemo-private/org.gnome.nemo.gschema.xml.in
Original file line number Diff line number Diff line change
Expand Up @@ -427,6 +427,11 @@
<_summary>Show side pane in new windows</_summary>
<_description>If set to true, newly opened windows will have the side pane visible.</_description>
</key>
<key name="start-with-menu-bar" type="b">
<default>true</default>
<_summary>Show menu bar in new windows</_summary>
<_description>If set to true, newly opened windows will have the menu bar visible.</_description>
</key>
<key name="side-pane-view" type="s">
<choices>
<choice value='places'/>
Expand Down
7 changes: 6 additions & 1 deletion src/nemo-window.c
Original file line number Diff line number Diff line change
Expand Up @@ -562,7 +562,12 @@ nemo_window_constructed (GObject *self)
menu = gtk_ui_manager_get_widget (window->details->ui_manager, "/MenuBar");
window->details->menubar = menu;
gtk_widget_set_hexpand (menu, TRUE);
gtk_widget_show (menu);
if (g_settings_get_boolean (nemo_window_state, NEMO_WINDOW_STATE_START_WITH_MENU_BAR)){
gtk_widget_show (menu);
} else {
gtk_widget_hide (menu);
}

gtk_container_add (GTK_CONTAINER (grid), menu);

/* Set up the toolbar place holder */
Expand Down