[gnome-photos] main-toolbar: Take advantage of new convenience API
- From: Debarshi Ray <debarshir src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [gnome-photos] main-toolbar: Take advantage of new convenience API
- Date: Wed, 4 Nov 2015 14:04:18 +0000 (UTC)
commit 4c279a1a2c6987d46261f3e04ff59c0f3523d3c8
Author: Debarshi Ray <debarshir gnome org>
Date: Tue Nov 3 08:09:47 2015 +0100
main-toolbar: Take advantage of new convenience API
It wasn't there when the code was written, but is now old enough that
we can use it without requiring a new GTK+.
src/photos-main-toolbar.c | 6 ++----
1 files changed, 2 insertions(+), 4 deletions(-)
---
diff --git a/src/photos-main-toolbar.c b/src/photos-main-toolbar.c
index e6bca85..6a81171 100644
--- a/src/photos-main-toolbar.c
+++ b/src/photos-main-toolbar.c
@@ -401,8 +401,7 @@ photos_main_toolbar_create_preview_menu (PhotosMainToolbar *self)
GtkBuilder *builder;
PhotosBaseItem *item;
- builder = gtk_builder_new ();
- gtk_builder_add_from_resource (builder, "/org/gnome/Photos/preview-menu.ui", NULL);
+ builder = gtk_builder_new_from_resource ("/org/gnome/Photos/preview-menu.ui");
menu = G_MENU (g_object_ref (gtk_builder_get_object (builder, "preview-menu")));
item = PHOTOS_BASE_ITEM (photos_base_manager_get_active_object (self->priv->item_mngr));
@@ -735,8 +734,7 @@ photos_main_toolbar_init (PhotosMainToolbar *self)
priv->gear_menu = G_SIMPLE_ACTION (g_action_map_lookup_action (G_ACTION_MAP (app), "gear-menu"));
priv->search = g_action_map_lookup_action (G_ACTION_MAP (app), "search");
- builder = gtk_builder_new ();
- gtk_builder_add_from_resource (builder, "/org/gnome/Photos/selection-menu.ui", NULL);
+ builder = gtk_builder_new_from_resource ("/org/gnome/Photos/selection-menu.ui");
selection_menu = G_MENU (gtk_builder_get_object (builder, "selection-menu"));
priv->selection_menu = gtk_menu_button_new ();
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]