[Xfce4-commits] [xfce/garcon] 01/01: Improve docstrings
noreply at xfce.org
noreply at xfce.org
Tue Jan 28 00:04:10 CET 2020
This is an automated email from the git hooks/post-receive script.
o c h o s i p u s h e d a c o m m i t t o b r a n c h m a s t e r
in repository xfce/garcon.
commit 41406cf1a211cbb67c53b9275c4fe2c1046df254
Author: Simon Steinbeiss <simon.steinbeiss at elfenbeinturm.at>
Date: Tue Jan 28 00:01:10 2020 +0100
Improve docstrings
---
garcon-gtk/garcon-gtk-menu.c | 39 +++++++++++++++++++++++++++++++++++----
1 file changed, 35 insertions(+), 4 deletions(-)
diff --git a/garcon-gtk/garcon-gtk-menu.c b/garcon-gtk/garcon-gtk-menu.c
index 72e73ac..211be13 100644
--- a/garcon-gtk/garcon-gtk-menu.c
+++ b/garcon-gtk/garcon-gtk-menu.c
@@ -1184,7 +1184,7 @@ garcon_gtk_menu_set_show_tooltips (GarconGtkMenu *menu,
* garcon_gtk_menu_get_show_tooltips:
* @menu : A #GarconGtkMenu
*
- * Return value: if descriptions are shown in tooltip
+ * Return value: Whether descriptions are shown in the tooltip.
**/
gboolean
garcon_gtk_menu_get_show_tooltips (GarconGtkMenu *menu)
@@ -1193,6 +1193,8 @@ garcon_gtk_menu_get_show_tooltips (GarconGtkMenu *menu)
return menu->priv->show_tooltips;
}
+
+
/**
* garcon_gtk_menu_set_show_desktop_actions:
* @menu : A #GarconGtkMenu
@@ -1220,7 +1222,7 @@ garcon_gtk_menu_set_show_desktop_actions (GarconGtkMenu *menu,
* garcon_gtk_menu_get_show_desktop_actions:
* @menu : A #GarconGtkMenu
*
- * Return value: if the desktop actions in a submenu
+ * Return value: Whether desktop actions are shown in a submenu.
**/
gboolean
garcon_gtk_menu_get_show_desktop_actions (GarconGtkMenu *menu)
@@ -1230,10 +1232,39 @@ garcon_gtk_menu_get_show_desktop_actions (GarconGtkMenu *menu)
}
+
+/**
+ * garcon_gtk_menu_get_desktop_actions_menu:
+ * @item : A #GarconMenuItem
+ *
+ * Return value: a #GtkMenu holding all actions described in the desktop file
+ * as menu items. Note that application icons are never shown on the
+ * action menu items.
+ **/
+GtkMenu *
+garcon_gtk_menu_get_desktop_actions_menu (GarconMenuItem *item)
+{
+ GtkWidget *submenu = gtk_menu_new ();
+ GList *actions = NULL;
+ const gchar *parent_icon_name;
+ gboolean show_menu_icons = FALSE;
+
+ actions = garcon_menu_item_get_actions (item);
+ g_return_val_if_fail (actions != NULL, NULL);
+
+ parent_icon_name = garcon_menu_item_get_icon_name (item);
+
+ garcon_gtk_menu_pack_actions_menu (submenu, item, actions, parent_icon_name, show_menu_icons);
+
+ return submenu;
+}
+
+
+
/**
* garcon_gtk_menu_set_right_click_edits:
* @menu : A #GarconGtkMenu
- * @enable_right_click_edits : Toggle showing wether to launch an editor
+ * @enable_right_click_edits : Toggle showing whether to launch an editor
* when the menu is clicked with the secondary mouse button.
*
**/
@@ -1258,7 +1289,7 @@ garcon_gtk_menu_set_right_click_edits (GarconGtkMenu *menu,
* garcon_gtk_menu_get_right_click_edits:
* @menu : A #GarconGtkMenu
*
- * Return value: if an editor will be launched on secondary mouse clicks.
+ * Return value: Whether an editor will be launched on secondary mouse clicks
**/
gboolean
garcon_gtk_menu_get_right_click_edits (GarconGtkMenu *menu)
--
To stop receiving notification emails like this one, please contact
the administrator of this repository.
More information about the Xfce4-commits
mailing list