-2007-05-09 Nickolay V. Shmyrev <nshmyrev@yandex.ru>
+2007-05-10 Nickolay V. Shmyrev <nshmyrev@yandex.ru>
- * shell/ev-application.c: (ev_application_open_window),
- (ev_application_add_icon_path_for_screen),
- (ev_application_open_uri_at_dest):
- * shell/ev-navigation-action-widget.c: (popup_menu_under_arrow):
- * shell/ev-navigation-action.c: (build_menu):
+ * shell/ev-navigation-action-widget.c:
+ (ev_navigation_action_widget_init),
+ (ev_navigation_action_widget_class_init),
+ (ev_navigation_action_widget_button_press_event):
- Add app-specific icons to our icon theme. Fixes bug
- #425508.
+ Connect to button-press event on correct widget. Fixes
+ bug #431988
2007-05-09 Nickolay V. Shmyrev <nshmyrev@yandex.ru>
(ev_application_open_uri_at_dest):
* shell/ev-navigation-action-widget.c: (popup_menu_under_arrow):
* shell/ev-navigation-action.c: (build_menu):
+
+ Add app-specific icons to our icon theme. Fixes bug
+ #425508.
2007-05-09 Nickolay V. Shmyrev <nshmyrev@yandex.ru>
* shell/ev-window.c: (ev_window_setup_action_sensitivity):
Make navigation action unsensitive instead of showing
- menu with unsensitive word.
+ menu with unsensitive word. Fixes bug #417392.
2007-05-08 Carlos Garcia Campos <carlosgc@gnome.org>
static void ev_navigation_action_widget_class_init (EvNavigationActionWidgetClass *action_widget);
static void ev_navigation_action_widget_toggled (GtkToggleToolButton *toggle);
static gboolean ev_navigation_action_widget_button_press_event (GtkWidget *widget,
- GdkEventButton *event);
+ GdkEventButton *event,
+ gpointer data);
G_DEFINE_TYPE (EvNavigationActionWidget, ev_navigation_action_widget, GTK_TYPE_TOGGLE_TOOL_BUTTON)
static void
ev_navigation_action_widget_init (EvNavigationActionWidget *action_widget)
{
+ GtkWidget *toggle_button;
+
+ /* It's rather dirty hack but we need a child to connect to
+ * button press event
+ */
+
+ toggle_button = gtk_bin_get_child (GTK_BIN (action_widget));
+
+ g_signal_connect (toggle_button, "button-press-event",
+ ev_navigation_action_widget_button_press_event,
+ action_widget);
return;
}
static void
ev_navigation_action_widget_class_init (EvNavigationActionWidgetClass *klass)
{
- GtkWidgetClass *widget_class = GTK_WIDGET_CLASS (klass);
GtkToggleToolButtonClass *toggle_tool_button_class = GTK_TOGGLE_TOOL_BUTTON_CLASS (klass);
- widget_class->button_press_event = ev_navigation_action_widget_button_press_event;
toggle_tool_button_class->toggled = ev_navigation_action_widget_toggled;
-
signals[SHOW_MENU] =
g_signal_new ("show-menu",
G_OBJECT_CLASS_TYPE (klass),
static gboolean
ev_navigation_action_widget_button_press_event (GtkWidget *widget,
- GdkEventButton *event)
+ GdkEventButton *event,
+ gpointer data)
{
- EvNavigationActionWidget *button = EV_NAVIGATION_ACTION_WIDGET (widget);
+ EvNavigationActionWidget *button = EV_NAVIGATION_ACTION_WIDGET (data);
+
if (event->button == 1) {
popup_menu_under_arrow (button, event);
gtk_toggle_tool_button_set_active (GTK_TOGGLE_TOOL_BUTTON (button), TRUE);