[gnome-photos] Use a simple button instead of a toggle to denote favorites
- From: Debarshi Ray <debarshir src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [gnome-photos] Use a simple button instead of a toggle to denote favorites
- Date: Fri, 23 Oct 2015 08:00:31 +0000 (UTC)
commit 96c8000a09f7431214afc2d07a900918d75e9a6a
Author: Alessandro Bono <shadow openaliasbox org>
Date: Thu Oct 22 20:08:30 2015 +0200
Use a simple button instead of a toggle to denote favorites
https://bugzilla.gnome.org/show_bug.cgi?id=751106
src/photos-main-toolbar.c | 6 +-----
src/photos-selection-toolbar.c | 4 +---
2 files changed, 2 insertions(+), 8 deletions(-)
---
diff --git a/src/photos-main-toolbar.c b/src/photos-main-toolbar.c
index fd4cdb0..1cd013c 100644
--- a/src/photos-main-toolbar.c
+++ b/src/photos-main-toolbar.c
@@ -458,10 +458,6 @@ photos_main_toolbar_favorite_button_update (PhotosMainToolbar *self, gboolean fa
GtkWidget *image;
gchar *favorite_label;
- g_signal_handlers_block_by_func (priv->favorite_button, photos_main_toolbar_favorite_button_clicked, self);
- gtk_toggle_button_set_active (GTK_TOGGLE_BUTTON (priv->favorite_button), favorite);
- g_signal_handlers_unblock_by_func (priv->favorite_button, photos_main_toolbar_favorite_button_clicked,
self);
-
if (favorite)
{
favorite_label = g_strdup (_("Remove from favorites"));
@@ -584,7 +580,7 @@ photos_main_toolbar_populate_for_preview (PhotosMainToolbar *self)
g_simple_action_set_enabled (priv->gear_menu, TRUE);
- priv->favorite_button = gtk_toggle_button_new ();
+ priv->favorite_button = gtk_button_new ();
gtk_header_bar_pack_end (GTK_HEADER_BAR (priv->toolbar), priv->favorite_button);
g_signal_connect_swapped (priv->favorite_button,
"clicked",
diff --git a/src/photos-selection-toolbar.c b/src/photos-selection-toolbar.c
index abb47c2..a77ab2a 100644
--- a/src/photos-selection-toolbar.c
+++ b/src/photos-selection-toolbar.c
@@ -289,13 +289,11 @@ photos_selection_toolbar_set_item_visibility (PhotosSelectionToolbar *self)
if (show_favorite && fav_count == sel_length)
{
favorite_label = g_strdup (_("Remove from favorites"));
- gtk_toggle_button_set_active (GTK_TOGGLE_BUTTON (priv->toolbar_favorite), TRUE);
image = gtk_image_new_from_icon_name (PHOTOS_ICON_FAVORITE_SYMBOLIC, GTK_ICON_SIZE_BUTTON);
}
else
{
favorite_label = g_strdup (_("Add to favorites"));
- gtk_toggle_button_set_active (GTK_TOGGLE_BUTTON (priv->toolbar_favorite), FALSE);
image = gtk_image_new_from_icon_name (PHOTOS_ICON_NOT_FAVORITE_SYMBOLIC, GTK_ICON_SIZE_BUTTON);
}
@@ -443,7 +441,7 @@ photos_selection_toolbar_init (PhotosSelectionToolbar *self)
toolbar = gtk_action_bar_new ();
gtk_container_add (GTK_CONTAINER (self), toolbar);
- priv->toolbar_favorite = gtk_toggle_button_new ();
+ priv->toolbar_favorite = gtk_button_new ();
gtk_action_bar_pack_start (GTK_ACTION_BAR (toolbar), priv->toolbar_favorite);
g_signal_connect (priv->toolbar_favorite,
"clicked",
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]