Created
October 26, 2011 13:53
-
-
Save shellexy/1316417 to your computer and use it in GitHub Desktop.
让 nautilus 在桌面没有使用 appmenu 时不要显示多余的屏幕顶部菜单栏
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
diff --git a/nautilus-3.2.0/src/nautilus-desktop-window.c b/nautilus-3.2.0/src/nautilus-desktop-window.c | |
--- a/nautilus-3.2.0/src/nautilus-desktop-window.c | |
+++ b/nautilus-3.2.0/src/nautilus-desktop-window.c | |
@@ -246,6 +246,11 @@ nautilus_desktop_window_constructed (GOb | |
g_signal_connect_swapped (nautilus_preferences, "changed::" NAUTILUS_PREFERENCES_DESKTOP_IS_HOME_DIR, | |
G_CALLBACK (nautilus_desktop_window_update_directory), | |
window); | |
+ | |
+ GtkWidget * menubar_parent = gtk_widget_get_parent (NAUTILUS_WINDOW (window)->details->menubar); | |
+ GtkWidget * menubar_viewport = gtk_viewport_new (NULL, NULL); | |
+ gtk_widget_reparent (NAUTILUS_WINDOW (window)->details->menubar, menubar_viewport); | |
+ gtk_table_attach (GTK_TABLE (menubar_parent), menubar_viewport, 0, 1, 0, 1, GTK_SHRINK, GTK_SHRINK, 0, 0); | |
} | |
static void |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment