Commit 32640a6c authored by Sven Neumann's avatar Sven Neumann Committed by Sven Neumann

don't set a help-id on items in the Open Recent menu.

2008-04-02  Sven Neumann  <sven@gimp.org>

	* app/actions/file-actions.c: don't set a help-id on items in the
	Open Recent menu.

	* app/menus/file-menu.c (file_menu_setup): show a larger thumbnail
	in the tooltips for recently used images.

svn path=/trunk/; revision=25332
parent 4ecea240
2008-04-02 Sven Neumann <sven@gimp.org>
* app/actions/file-actions.c: don't set a help-id on items in the
Open Recent menu.
* app/menus/file-menu.c (file_menu_setup): show a larger thumbnail
in the tooltips for recently used images.
2008-04-02 Sven Neumann <sven@gimp.org>
* plug-ins/help/Makefile.am
......
......@@ -166,7 +166,6 @@ file_actions_setup (GimpActionGroup *group)
entries[i].tooltip = NULL;
entries[i].value = i;
entries[i].value_variable = FALSE;
entries[i].help_id = GIMP_HELP_FILE_OPEN_RECENT;
if (i < 9)
entries[i].accelerator = g_strdup_printf ("<control>%d", i + 1);
......
......@@ -20,17 +20,29 @@
#include <gtk/gtk.h>
#include "libgimpthumb/gimpthumb.h"
#include "menus-types.h"
#include "config/gimpguiconfig.h"
#include "core/gimp.h"
#include "core/gimpviewable.h"
#include "widgets/gimpaction.h"
#include "widgets/gimpuimanager.h"
#include "file-menu.h"
static gboolean file_menu_open_recent_query_tooltip (GtkWidget *widget,
gint x,
gint y,
gboolean keyboard_mode,
GtkTooltip *tooltip,
GimpAction *action);
void
file_menu_setup (GimpUIManager *manager,
const gchar *ui_path)
......@@ -51,8 +63,10 @@ file_menu_setup (GimpUIManager *manager,
for (i = 0; i < n_entries; i++)
{
gchar *action_name;
gchar *action_path;
GtkWidget *widget;
gchar *action_name;
gchar *action_path;
gchar *full_path;
action_name = g_strdup_printf ("file-open-recent-%02d", i + 1);
action_path = g_strdup_printf ("%s/File/Open Recent/Files", ui_path);
......@@ -62,7 +76,41 @@ file_menu_setup (GimpUIManager *manager,
GTK_UI_MANAGER_MENUITEM,
FALSE);
full_path = g_strconcat (action_path, "/", action_name, NULL);
widget = gtk_ui_manager_get_widget (ui_manager, full_path);
if (widget)
{
GtkAction *action;
action = gimp_ui_manager_find_action (manager, "file", action_name);
g_signal_connect_object (widget, "query-tooltip",
G_CALLBACK (file_menu_open_recent_query_tooltip),
action, 0);
}
g_free (action_name);
g_free (action_path);
g_free (full_path);
}
}
static gboolean
file_menu_open_recent_query_tooltip (GtkWidget *widget,
gint x,
gint y,
gboolean keyboard_mode,
GtkTooltip *tooltip,
GimpAction *action)
{
gtk_tooltip_set_text (tooltip, gtk_widget_get_tooltip_text (widget));
gtk_tooltip_set_icon (tooltip,
gimp_viewable_get_pixbuf (action->viewable,
action->context,
GIMP_THUMB_SIZE_NORMAL,
GIMP_THUMB_SIZE_NORMAL));
return TRUE;
}
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment