[Xfce4-commits] <xfce4-panel:devel> Show the desktop file location in the add dialog.
Nick Schermer
noreply at xfce.org
Sat Oct 24 12:50:01 CEST 2009
Updating branch refs/heads/devel
to bef7f17c8a4449f9d9de702da0d306ae1847cfc1 (commit)
from f1404235b1907f24ac6e2d101d045a1818262d1d (commit)
commit bef7f17c8a4449f9d9de702da0d306ae1847cfc1
Author: Nick Schermer <nick at xfce.org>
Date: Sat Oct 24 12:47:59 2009 +0200
Show the desktop file location in the add dialog.
plugins/launcher/launcher-dialog.c | 13 ++++++++++++-
plugins/launcher/launcher-dialog.ui | 4 ++++
2 files changed, 16 insertions(+), 1 deletions(-)
diff --git a/plugins/launcher/launcher-dialog.c b/plugins/launcher/launcher-dialog.c
index 6a8ff01..b9e5fb5 100644
--- a/plugins/launcher/launcher-dialog.c
+++ b/plugins/launcher/launcher-dialog.c
@@ -62,7 +62,8 @@ enum
COL_ICON,
COL_NAME,
COL_ITEM,
- COL_SEARCH
+ COL_SEARCH,
+ COL_TOOLTIP
};
@@ -145,6 +146,8 @@ launcher_dialog_add_store_insert_menu (GarconMenu *menu,
GList *li, *items;
GList *menus;
GtkTreeIter iter;
+ gchar *tooltip;
+ GFile *item_file;
panel_return_if_fail (GARCON_IS_MENU (menu));
panel_return_if_fail (GTK_IS_LIST_STORE (model));
@@ -153,11 +156,19 @@ launcher_dialog_add_store_insert_menu (GarconMenu *menu,
items = garcon_menu_get_items (menu);
for (li = items; li != NULL; li = li->next)
{
+ panel_return_if_fail (GARCON_IS_MENU_ITEM (li->data));
if (!garcon_menu_element_get_visible (GARCON_MENU_ELEMENT (li->data)))
continue;
gtk_list_store_append (GTK_LIST_STORE (model), &iter);
launcher_dialog_items_set_item (model, &iter, li->data);
+
+ item_file = garcon_menu_item_get_file (li->data);
+ tooltip = g_file_get_parse_name (item_file);
+ gtk_list_store_set (GTK_LIST_STORE (model), &iter,
+ COL_TOOLTIP, tooltip, -1);
+ g_object_unref (G_OBJECT (item_file));
+ g_free (tooltip);
}
g_list_free (items);
diff --git a/plugins/launcher/launcher-dialog.ui b/plugins/launcher/launcher-dialog.ui
index c8600be..5fa06cb 100644
--- a/plugins/launcher/launcher-dialog.ui
+++ b/plugins/launcher/launcher-dialog.ui
@@ -39,6 +39,8 @@
<column type="GObject"/>
<!-- column-name search -->
<column type="gchararray"/>
+ <!-- column-name tooltip -->
+ <column type="gchararray"/>
</columns>
</object>
<object class="GtkListStore" id="item-store">
@@ -322,6 +324,7 @@
<child>
<object class="GtkComboBox" id="arrow-position">
<property name="visible">True</property>
+ <property name="model">arrow-position-model</property>
<child>
<object class="GtkCellRendererText" id="cellrenderertext1"/>
<attributes>
@@ -474,6 +477,7 @@
<property name="headers_visible">False</property>
<property name="rules_hint">True</property>
<property name="enable_search">False</property>
+ <property name="tooltip_column">4</property>
<child>
<object class="GtkTreeViewColumn" id="treeviewcolumn1">
<property name="spacing">2</property>
More information about the Xfce4-commits
mailing list