gimp r25332 - in trunk: . app/actions app/menus
- From: neo svn gnome org
- To: svn-commits-list gnome org
- Subject: gimp r25332 - in trunk: . app/actions app/menus
- Date: Wed, 2 Apr 2008 15:11:32 +0100 (BST)
Author: neo
Date: Wed Apr 2 15:11:32 2008
New Revision: 25332
URL: http://svn.gnome.org/viewvc/gimp?rev=25332&view=rev
Log:
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.
Modified:
trunk/ChangeLog
trunk/app/actions/file-actions.c
trunk/app/menus/file-menu.c
Modified: trunk/app/actions/file-actions.c
==============================================================================
--- trunk/app/actions/file-actions.c (original)
+++ trunk/app/actions/file-actions.c Wed Apr 2 15:11:32 2008
@@ -166,7 +166,6 @@
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);
Modified: trunk/app/menus/file-menu.c
==============================================================================
--- trunk/app/menus/file-menu.c (original)
+++ trunk/app/menus/file-menu.c Wed Apr 2 15:11:32 2008
@@ -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 @@
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 @@
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;
+}
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]