[anjuta] snippets: Add tooltips (bgo#627089)
- From: Johannes Schmid <jhs src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [anjuta] snippets: Add tooltips (bgo#627089)
- Date: Mon, 5 Mar 2012 18:34:15 +0000 (UTC)
commit fea4c4d9eacc4fa4707d2f347cb15f78e87ad81c
Author: Johannes Schmid <jhs gnome org>
Date: Mon Mar 5 19:28:17 2012 +0100
snippets: Add tooltips (bgo#627089)
plugins/snippets-manager/snippets-browser.c | 13 +++++---
plugins/snippets-manager/snippets-browser.ui | 2 +-
.../snippets-manager-preferences.ui | 30 +++++++++++++++----
3 files changed, 32 insertions(+), 13 deletions(-)
---
diff --git a/plugins/snippets-manager/snippets-browser.c b/plugins/snippets-manager/snippets-browser.c
index ac73967..4b2b89e 100644
--- a/plugins/snippets-manager/snippets-browser.c
+++ b/plugins/snippets-manager/snippets-browser.c
@@ -189,21 +189,27 @@ init_browser_layout (SnippetsBrowser *snippets_browser)
/* Get the Gtk objects */
priv->add_button = GTK_BUTTON(gtk_button_new());
+ gtk_widget_set_tooltip_text (GTK_WIDGET (priv->add_button),
+ _("Add snippet"));
gtk_container_add (GTK_CONTAINER (priv->add_button),
gtk_image_new_from_stock (GTK_STOCK_ADD,
GTK_ICON_SIZE_MENU));
priv->delete_button = GTK_BUTTON(gtk_button_new());
+ gtk_widget_set_tooltip_text (GTK_WIDGET (priv->delete_button),
+ _("Remove selected snippet"));
gtk_container_add (GTK_CONTAINER (priv->delete_button),
- gtk_image_new_from_stock (GTK_STOCK_DELETE,
+ gtk_image_new_from_stock (GTK_STOCK_REMOVE,
GTK_ICON_SIZE_MENU));
priv->insert_button = GTK_BUTTON(gtk_button_new());
+ gtk_widget_set_tooltip_text (GTK_WIDGET (priv->insert_button),
+ _("Insert snippet into editor at current cursor position"));
gtk_container_add (GTK_CONTAINER (priv->insert_button),
gtk_image_new_from_stock (GTK_STOCK_PASTE,
GTK_ICON_SIZE_MENU));
priv->grip = gtk_hbox_new (FALSE, 5);
priv->edit_button = GTK_TOGGLE_BUTTON (gtk_builder_get_object (bxml, "edit_button"));
priv->snippets_view_cont = GTK_SCROLLED_WINDOW (gtk_builder_get_object (bxml, "snippets_view_cont"));
- priv->snippets_view_vbox = GTK_VBOX (gtk_builder_get_object (bxml, "snippets_view_vbox"));
+ priv->snippets_view_vbox = GTK_BOX (gtk_builder_get_object (bxml, "snippets_view_vbox"));
gtk_box_pack_start (GTK_BOX (priv->grip), gtk_label_new (_("Snippets")), FALSE, FALSE, 5);
gtk_box_pack_end (GTK_BOX (priv->grip), GTK_WIDGET(priv->insert_button), FALSE, FALSE, 1);
@@ -213,9 +219,6 @@ init_browser_layout (SnippetsBrowser *snippets_browser)
gtk_widget_show_all (priv->grip);
/* Assert the objects */
- g_return_if_fail (GTK_IS_BUTTON (priv->add_button));
- g_return_if_fail (GTK_IS_BUTTON (priv->delete_button));
- g_return_if_fail (GTK_IS_BUTTON (priv->insert_button));
g_return_if_fail (GTK_IS_TOGGLE_BUTTON (priv->edit_button));
g_return_if_fail (GTK_IS_SCROLLED_WINDOW (priv->snippets_view_cont));
g_return_if_fail (GTK_IS_VBOX (priv->snippets_view_vbox));
diff --git a/plugins/snippets-manager/snippets-browser.ui b/plugins/snippets-manager/snippets-browser.ui
index 027484a..304db1b 100644
--- a/plugins/snippets-manager/snippets-browser.ui
+++ b/plugins/snippets-manager/snippets-browser.ui
@@ -1,6 +1,6 @@
<?xml version="1.0"?>
<interface>
- <requires lib="gtk+" version="2.16"/>
+ <requires lib="gtk+" version="3.0"/>
<!-- interface-naming-policy project-wide -->
<object class="GtkWindow" id="builder_window">
<child>
diff --git a/plugins/snippets-manager/snippets-manager-preferences.ui b/plugins/snippets-manager/snippets-manager-preferences.ui
index 0a54e16..d6d399b 100644
--- a/plugins/snippets-manager/snippets-manager-preferences.ui
+++ b/plugins/snippets-manager/snippets-manager-preferences.ui
@@ -1,37 +1,43 @@
-<?xml version="1.0"?>
+<?xml version="1.0" encoding="UTF-8"?>
<interface>
- <requires lib="gtk+" version="2.16"/>
- <!-- interface-naming-policy project-wide -->
+ <!-- interface-requires gtk+ 3.0 -->
<object class="GtkWindow" id="_not_used">
+ <property name="can_focus">False</property>
<property name="title" translatable="yes">window1</property>
<child>
<object class="GtkFrame" id="snippets_preferences_root">
<property name="visible">True</property>
+ <property name="can_focus">False</property>
<property name="label_xalign">0</property>
<property name="shadow_type">none</property>
<child>
<object class="GtkAlignment" id="alignment1">
<property name="visible">True</property>
+ <property name="can_focus">False</property>
<property name="left_padding">12</property>
<child>
<object class="GtkVBox" id="vbox2">
<property name="visible">True</property>
+ <property name="can_focus">False</property>
<child>
<object class="GtkScrolledWindow" id="scrolledwindow1">
<property name="visible">True</property>
<property name="can_focus">True</property>
- <property name="hscrollbar_policy">automatic</property>
- <property name="vscrollbar_policy">automatic</property>
<property name="shadow_type">in</property>
<child>
<object class="GtkTreeView" id="global_vars_view">
<property name="visible">True</property>
<property name="can_focus">True</property>
<property name="search_column">0</property>
+ <child internal-child="selection">
+ <object class="GtkTreeSelection" id="treeview-selection1"/>
+ </child>
</object>
</child>
</object>
<packing>
+ <property name="expand">True</property>
+ <property name="fill">True</property>
<property name="padding">6</property>
<property name="position">0</property>
</packing>
@@ -40,15 +46,20 @@
<object class="GtkHBox" id="hbox1">
<property name="height_request">28</property>
<property name="visible">True</property>
+ <property name="can_focus">False</property>
<child>
<object class="GtkButton" id="add_var_button">
+ <property name="use_action_appearance">False</property>
<property name="width_request">48</property>
<property name="visible">True</property>
<property name="can_focus">True</property>
<property name="receives_default">True</property>
+ <property name="use_action_appearance">False</property>
<child>
<object class="GtkImage" id="image1">
<property name="visible">True</property>
+ <property name="can_focus">False</property>
+ <property name="tooltip_text" translatable="yes">Add snippet</property>
<property name="stock">gtk-add</property>
</object>
</child>
@@ -61,14 +72,18 @@
</child>
<child>
<object class="GtkButton" id="delete_var_button">
+ <property name="use_action_appearance">False</property>
<property name="width_request">48</property>
<property name="visible">True</property>
<property name="can_focus">True</property>
<property name="receives_default">True</property>
+ <property name="use_action_appearance">False</property>
<child>
<object class="GtkImage" id="image2">
<property name="visible">True</property>
- <property name="stock">gtk-delete</property>
+ <property name="can_focus">False</property>
+ <property name="tooltip_text" translatable="yes">Remove selected snippet</property>
+ <property name="stock">gtk-remove</property>
</object>
</child>
</object>
@@ -96,9 +111,10 @@
<child type="label">
<object class="GtkLabel" id="global_vars_label">
<property name="visible">True</property>
+ <property name="can_focus">False</property>
<property name="label" translatable="yes">Anjuta variables</property>
<attributes>
- <attribute name="weight" value="PANGO_WEIGHT_BOLD"/>
+ <attribute name="weight" value="bold"/>
</attributes>
</object>
</child>
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]