From 64bdedb50799a1feb57df8f960bf5bd8ec2cb1cd43d596c46f53ec7574f2497d Mon Sep 17 00:00:00 2001 From: Alexei Sorokin Date: Mon, 26 Oct 2015 22:16:15 +0000 Subject: [PATCH] OBS-URL: https://build.opensuse.org/package/show/X11:Cinnamon:Factory/nemo?expand=0&rev=78 --- nemo-statusbar-size.patch | 103 +++++++++++++++++++++++++++++++++++++- nemo.spec | 1 - 2 files changed, 101 insertions(+), 3 deletions(-) diff --git a/nemo-statusbar-size.patch b/nemo-statusbar-size.patch index 76685e7..a1d0753 100644 --- a/nemo-statusbar-size.patch +++ b/nemo-statusbar-size.patch @@ -1,11 +1,110 @@ +--- a/libnemo-extension/nemo-simple-button.c ++++ b/libnemo-extension/nemo-simple-button.c +@@ -41,26 +41,30 @@ NemoSimpleButton * + nemo_simple_button_new_from_icon_name (const gchar *icon_name, int icon_size) + { + GtkWidget *w, *image; ++ GtkIconInfo *icon_info; ++ GdkRGBA colour; ++ ++ gdk_rgba_parse (&colour, "rgba(0.0,0.0,0.0,1.0)"); + + w = g_object_new (NEMO_TYPE_SIMPLE_BUTTON, NULL); + +- image = gtk_image_new_from_icon_name (icon_name, icon_size); ++ icon_info = gtk_icon_theme_lookup_icon (gtk_icon_theme_get_default (), ++ icon_name, icon_size, ++ GTK_ICON_LOOKUP_FORCE_SIZE); ++ image = gtk_image_new_from_pixbuf (gtk_icon_info_load_symbolic ( ++ icon_info, &colour, ++ NULL, NULL, NULL, NULL, NULL)); ++ + gtk_button_set_image (GTK_BUTTON (w), image); + + return NEMO_SIMPLE_BUTTON (w); + } + ++/* Deprecated since Gtk 3.10. */ + NemoSimpleButton * + nemo_simple_button_new_from_stock (const gchar *stock_id, int icon_size) + { +- GtkWidget *w, *image; +- +- w = g_object_new (NEMO_TYPE_SIMPLE_BUTTON, NULL); +- +- image = gtk_image_new_from_stock (stock_id, icon_size); +- gtk_button_set_image (GTK_BUTTON (w), image); +- +- return NEMO_SIMPLE_BUTTON (w); ++ return nemo_simple_button_new_from_icon_name(stock_id, icon_size); + } + + NemoSimpleButton * --- a/src/nemo-statusbar.c +++ b/src/nemo-statusbar.c -@@ -186,7 +186,7 @@ nemo_status_bar_constructed (GObject *ob +@@ -186,16 +186,24 @@ nemo_status_bar_constructed (GObject *ob bar->real_statusbar = statusbar; - GtkIconSize size = gtk_icon_size_from_name (NEMO_STATUSBAR_ICON_SIZE_NAME); -+ GtkIconSize size = gtk_icon_size_register ("", 16, 16); ++ gint size = 16; /* Unscaled size. */ context = gtk_widget_get_style_context (GTK_WIDGET (bar)); gtk_style_context_add_class (context, GTK_STYLE_CLASS_TOOLBAR); + gtk_container_set_border_width (GTK_CONTAINER (bar), 2); + + GtkWidget *button, *icon; ++ GtkIconInfo *icon_info; ++ GdkRGBA colour; ++ ++ gdk_rgba_parse (&colour, "rgba(0.0,0.0,0.0,1.0)"); + + button = gtk_toggle_button_new (); +- icon = gtk_image_new_from_icon_name ("sidebar-places-symbolic", size); ++ icon_info = gtk_icon_theme_lookup_icon (gtk_icon_theme_get_default (), ++ "sidebar-places-symbolic", size, ++ GTK_ICON_LOOKUP_FORCE_SIZE); ++ icon = gtk_image_new_from_pixbuf (gtk_icon_info_load_symbolic (icon_info, ++ &colour, NULL, NULL, NULL, NULL, NULL)); + gtk_button_set_image (GTK_BUTTON (button), icon); + gtk_widget_set_tooltip_text (GTK_WIDGET (button), _("Show Places")); + bar->places_button = button; +@@ -204,7 +212,11 @@ nemo_status_bar_constructed (GObject *ob + G_CALLBACK (action_places_toggle_callback), bar); + + button = gtk_toggle_button_new (); +- icon = gtk_image_new_from_icon_name ("sidebar-tree-symbolic", size); ++ icon_info = gtk_icon_theme_lookup_icon (gtk_icon_theme_get_default (), ++ "sidebar-tree-symbolic", size, ++ GTK_ICON_LOOKUP_FORCE_SIZE); ++ icon = gtk_image_new_from_pixbuf (gtk_icon_info_load_symbolic (icon_info, ++ &colour, NULL, NULL, NULL, NULL, NULL)); + gtk_button_set_image (GTK_BUTTON (button), icon); + gtk_widget_set_tooltip_text (GTK_WIDGET (button), _("Show Treeview")); + bar->tree_button = button; +@@ -218,7 +230,11 @@ nemo_status_bar_constructed (GObject *ob + bar->separator = sep; + + button = gtk_button_new (); +- icon = gtk_image_new_from_icon_name ("sidebar-hide-symbolic", size); ++ icon_info = gtk_icon_theme_lookup_icon (gtk_icon_theme_get_default (), ++ "sidebar-hide-symbolic", size, ++ GTK_ICON_LOOKUP_FORCE_SIZE); ++ icon = gtk_image_new_from_pixbuf (gtk_icon_info_load_symbolic (icon_info, ++ &colour, NULL, NULL, NULL, NULL, NULL)); + gtk_button_set_image (GTK_BUTTON (button), icon); + gtk_widget_set_tooltip_text (GTK_WIDGET (button), _("Hide the Sidebar (F9)")); + bar->hide_button = button; +@@ -227,7 +243,11 @@ nemo_status_bar_constructed (GObject *ob + G_CALLBACK (action_hide_sidebar_callback), bar); + + button = gtk_button_new (); +- icon = gtk_image_new_from_icon_name ("sidebar-show-symbolic", size); ++ icon_info = gtk_icon_theme_lookup_icon (gtk_icon_theme_get_default (), ++ "sidebar-show-symbolic", size, ++ GTK_ICON_LOOKUP_FORCE_SIZE); ++ icon = gtk_image_new_from_pixbuf (gtk_icon_info_load_symbolic (icon_info, ++ &colour, NULL, NULL, NULL, NULL, NULL)); + gtk_button_set_image (GTK_BUTTON (button), icon); + gtk_widget_set_tooltip_text (GTK_WIDGET (button), _("Show the Sidebar (F9)")); + bar->show_button = button; diff --git a/nemo.spec b/nemo.spec index 68d6a0e..e66bfac 100644 --- a/nemo.spec +++ b/nemo.spec @@ -66,7 +66,6 @@ Requires: python Requires: shared-mime-info >= 0.50 Recommends: gdk-pixbuf-loader-rsvg Recommends: gvfs-backends -Recommends: nemo-fileroller Suggests: eog Suggests: evince Suggests: totem