2007-03-28 [colin] 2.8.1cvs60

* src/mimeview.c
		Add popup menu for mime icons
This commit is contained in:
Colin Leroy 2007-03-28 19:46:10 +00:00
parent 3effba49af
commit b0bca16378
4 changed files with 29 additions and 1 deletions

View file

@ -1,3 +1,8 @@
2007-03-28 [colin] 2.8.1cvs60
* src/mimeview.c
Add popup menu for mime icons
2007-03-28 [colin] 2.8.1cvs59
* src/mainwindow.c

View file

@ -2476,3 +2476,4 @@
( cvs diff -u -r 1.382.2.365 -r 1.382.2.366 src/compose.c; cvs diff -u -r 1.207.2.155 -r 1.207.2.156 src/folderview.c; cvs diff -u -r 1.395.2.292 -r 1.395.2.293 src/summaryview.c; ) > 2.8.1cvs57.patchset
( cvs diff -u -r 1.382.2.366 -r 1.382.2.367 src/compose.c; ) > 2.8.1cvs58.patchset
( cvs diff -u -r 1.274.2.181 -r 1.274.2.182 src/mainwindow.c; cvs diff -u -r 1.43.2.63 -r 1.43.2.64 src/toolbar.c; cvs diff -u -r 1.19.2.16 -r 1.19.2.17 src/toolbar.h; ) > 2.8.1cvs59.patchset
( cvs diff -u -r 1.83.2.103 -r 1.83.2.104 src/mimeview.c; ) > 2.8.1cvs60.patchset

View file

@ -11,7 +11,7 @@ MINOR_VERSION=8
MICRO_VERSION=1
INTERFACE_AGE=0
BINARY_AGE=0
EXTRA_VERSION=59
EXTRA_VERSION=60
EXTRA_RELEASE=
EXTRA_GTK2_VERSION=

View file

@ -1970,6 +1970,19 @@ static void toggle_icon(GtkToggleButton *button, MimeView *mimeview)
}
}
static gboolean icon_popup_menu(GtkWidget *widget, gpointer data)
{
MimeView *mimeview = (MimeView *)data;
MimeInfo *partinfo = g_object_get_data(G_OBJECT(widget), "partinfo");
g_object_set_data(G_OBJECT(mimeview->popupmenu),
"pop_partinfo", partinfo);
gtk_menu_popup(GTK_MENU(mimeview->popupmenu),
NULL, NULL, NULL, NULL,
0, gtk_get_current_event_time());
return TRUE;
}
static void icon_list_append_icon (MimeView *mimeview, MimeInfo *mimeinfo)
{
GtkWidget *pixmap = NULL;
@ -2111,6 +2124,15 @@ static void icon_list_append_icon (MimeView *mimeview, MimeInfo *mimeinfo)
gtk_widget_show_all(button);
gtk_drag_source_set(button, GDK_BUTTON1_MASK|GDK_BUTTON3_MASK,
mimeview_mime_types, 1, GDK_ACTION_COPY);
#ifndef MAEMO
g_signal_connect(G_OBJECT(button), "popup-menu",
G_CALLBACK(icon_popup_menu), mimeview);
#else
gtk_widget_tap_and_hold_setup(GTK_WIDGET(button), NULL, NULL,
GTK_TAP_AND_HOLD_NONE | GTK_TAP_AND_HOLD_NO_INTERNALS);
g_signal_connect(G_OBJECT(button), "tap-and-hold",
G_CALLBACK(icon_popup_menu), mimeview);
#endif
g_signal_connect(G_OBJECT(button), "button_release_event",
G_CALLBACK(icon_clicked_cb), mimeview);
g_signal_connect(G_OBJECT(button), "key_press_event",