[epiphany] Passwords dialog: fix missing edges of buttons
- From: Michael Catanzaro <mcatanzaro src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [epiphany] Passwords dialog: fix missing edges of buttons
- Date: Thu, 19 Dec 2013 18:23:38 +0000 (UTC)
commit 0f3f615c481ff54947d18202aa2a385bfe10469f
Author: Michael Catanzaro <mcatanzaro gnome org>
Date: Sun Dec 15 11:41:47 2013 -0600
Passwords dialog: fix missing edges of buttons
The right edge of the remove button was cut off, as was the left edge of
the show passwords button.
https://bugzilla.gnome.org/show_bug.cgi?id=720499
src/passwords-dialog.c | 26 +++++++-------
src/resources/passwords-dialog.ui | 68 ++++++++++++++++++++++++++++--------
2 files changed, 66 insertions(+), 28 deletions(-)
---
diff --git a/src/passwords-dialog.c b/src/passwords-dialog.c
index 138bbfe..5b6eee1 100644
--- a/src/passwords-dialog.c
+++ b/src/passwords-dialog.c
@@ -51,8 +51,8 @@ struct PasswordsDialogPrivate
GtkWidget *liststore;
GtkWidget *treemodelfilter;
GtkWidget *treemodelsort;
- GtkWidget *remove_toolbutton;
- GtkWidget *show_passwords_toolbutton;
+ GtkWidget *remove_button;
+ GtkWidget *show_passwords_button;
GtkWidget *clear_button;
GtkWidget *password_column;
GtkWidget *password_renderer;
@@ -224,22 +224,22 @@ on_passwords_treeview_key_press_event (GtkWidget *widget,
}
static void
-on_remove_toolbutton_clicked (GtkToolButton *toolbutton,
- PasswordsDialog *dialog)
+on_remove_button_clicked (GtkButton *button,
+ PasswordsDialog *dialog)
{
delete_selection (dialog);
/* Restore the focus to the button */
- gtk_widget_grab_focus (GTK_WIDGET (toolbutton));
+ gtk_widget_grab_focus (GTK_WIDGET (button));
}
static void
-on_show_passwords_toolbutton_toggled (GtkToggleToolButton *toolbutton,
- PasswordsDialog *dialog)
+on_show_passwords_button_toggled (GtkToggleButton *button,
+ PasswordsDialog *dialog)
{
gboolean active;
- active = gtk_toggle_tool_button_get_active (toolbutton);
+ active = gtk_toggle_button_get_active (button);
gtk_tree_view_column_set_attributes (GTK_TREE_VIEW_COLUMN (dialog->priv->password_column),
GTK_CELL_RENDERER (dialog->priv->password_renderer),
@@ -256,7 +256,7 @@ on_treeview_selection_changed (GtkTreeSelection *selection,
has_selection = gtk_tree_selection_count_selected_rows (selection) > 0;
- gtk_widget_set_sensitive (dialog->priv->remove_toolbutton, has_selection);
+ gtk_widget_set_sensitive (dialog->priv->remove_button, has_selection);
}
static void
@@ -364,8 +364,8 @@ passwords_dialog_class_init (PasswordsDialogClass *klass)
gtk_widget_class_bind_template_child_private (widget_class, PasswordsDialog, treemodelsort);
gtk_widget_class_bind_template_child_private (widget_class, PasswordsDialog, passwords_treeview);
gtk_widget_class_bind_template_child_private (widget_class, PasswordsDialog, clear_button);
- gtk_widget_class_bind_template_child_private (widget_class, PasswordsDialog, remove_toolbutton);
- gtk_widget_class_bind_template_child_private (widget_class, PasswordsDialog,
show_passwords_toolbutton);
+ gtk_widget_class_bind_template_child_private (widget_class, PasswordsDialog, remove_button);
+ gtk_widget_class_bind_template_child_private (widget_class, PasswordsDialog, show_passwords_button);
gtk_widget_class_bind_template_child_private (widget_class, PasswordsDialog, password_column);
gtk_widget_class_bind_template_child_private (widget_class, PasswordsDialog, password_renderer);
gtk_widget_class_bind_template_child_private (widget_class, PasswordsDialog, treeview_popup_menu);
@@ -375,8 +375,8 @@ passwords_dialog_class_init (PasswordsDialogClass *klass)
gtk_widget_class_bind_template_callback (widget_class, on_passwords_treeview_key_press_event);
gtk_widget_class_bind_template_callback (widget_class, on_passwords_treeview_button_press_event);
gtk_widget_class_bind_template_callback (widget_class, on_treeview_selection_changed);
- gtk_widget_class_bind_template_callback (widget_class, on_remove_toolbutton_clicked);
- gtk_widget_class_bind_template_callback (widget_class, on_show_passwords_toolbutton_toggled);
+ gtk_widget_class_bind_template_callback (widget_class, on_remove_button_clicked);
+ gtk_widget_class_bind_template_callback (widget_class, on_show_passwords_button_toggled);
gtk_widget_class_bind_template_callback (widget_class, on_search_entry_changed);
gtk_widget_class_bind_template_callback (widget_class, on_copy_password_menuitem_activate);
gtk_widget_class_bind_template_callback (widget_class, on_copy_username_menuitem_activate);
diff --git a/src/resources/passwords-dialog.ui b/src/resources/passwords-dialog.ui
index 3add27b..19aaa5a 100644
--- a/src/resources/passwords-dialog.ui
+++ b/src/resources/passwords-dialog.ui
@@ -196,14 +196,35 @@
</style>
<property name="icon_size">1</property>
<child>
- <object class="GtkToolButton" id="remove_toolbutton">
+ <object class="GtkToolItem" id="toolitem1">
<property name="visible">True</property>
- <property name="sensitive">False</property>
<property name="can_focus">False</property>
- <property name="label" translatable="yes">Remove</property>
- <property name="use_underline">True</property>
- <property name="icon_name">list-remove-symbolic</property>
- <signal name="clicked" handler="on_remove_toolbutton_clicked"
object="PasswordsDialog" swapped="no"/>
+ <child>
+ <object class="GtkBox" id="remove_button_box">
+ <property name="visible">True</property>
+ <property name="can_focus">False</property>
+ <child>
+ <object class="GtkButton" id="remove_button">
+ <property name="visible">True</property>
+ <property name="sensitive">False</property>
+ <property name="can_focus">False</property>
+ <property name="use_underline">True</property>
+ <signal name="clicked" handler="on_remove_button_clicked"
object="PasswordsDialog" swapped="no"/>
+ <child>
+ <object class="GtkImage" id="remove_password_image">
+ <property name="visible">True</property>
+ <property name="can_focus">False</property>
+ <property name="icon_name">list-remove-symbolic</property>
+ <property name="icon-size">1</property>
+ </object>
+ </child>
+ </object>
+ <packing>
+ <property name="expand">False</property>
+ </packing>
+ </child>
+ </object>
+ </child>
</object>
<packing>
<property name="expand">False</property>
@@ -222,18 +243,35 @@
</packing>
</child>
<child>
- <object class="GtkToggleToolButton" id="show_passwords_toolbutton">
+ <object class="GtkToolItem" id="toolitem2">
<property name="visible">True</property>
<property name="can_focus">False</property>
- <property name="label" translatable="yes">Show Passwords</property>
- <property name="use_underline">True</property>
- <property name="icon_name">dialog-password-symbolic</property>
- <signal name="toggled" handler="on_show_passwords_toolbutton_toggled"
object="PasswordsDialog" swapped="no"/>
+ <child>
+ <object class="GtkBox" id="show_passwords_button_box">
+ <property name="visible">True</property>
+ <property name="can_focus">False</property>
+ <child>
+ <object class="GtkToggleButton" id="show_passwords_button">
+ <property name="visible">True</property>
+ <property name="can_focus">False</property>
+ <property name="use_underline">True</property>
+ <signal name="toggled" handler="on_show_passwords_button_toggled"
object="PasswordsDialog" swapped="no"/>
+ <child>
+ <object class="GtkImage" id="show_passwords_image">
+ <property name="visible">True</property>
+ <property name="can_focus">False</property>
+ <property name="icon_name">dialog-password-symbolic</property>
+ <property name="icon-size">1</property>
+ </object>
+ </child>
+ </object>
+ <packing>
+ <property name="expand">False</property>
+ </packing>
+ </child>
+ </object>
+ </child>
</object>
- <packing>
- <property name="expand">False</property>
- <property name="homogeneous">True</property>
- </packing>
</child>
</object>
<packing>
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]