[gtk+/wip/csoriano/gtkpathbar_rework: 4/11] gtkpathbar: remove unfocus management
- From: Carlos Soriano Sánchez <csoriano src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [gtk+/wip/csoriano/gtkpathbar_rework: 4/11] gtkpathbar: remove unfocus management
- Date: Thu, 13 Aug 2015 07:26:27 +0000 (UTC)
commit 749dd07e6881e44a65175eeedd1ee92c2f2ba1b6
Author: Carlos Soriano <csoriano gnome org>
Date: Tue Mar 3 15:06:24 2015 +0100
gtkpathbar: remove unfocus management
Seems it's not necesary, and NautilusPathbar is not using it.
gtk/gtkpathbar.c | 64 --------------------------------------------------
gtk/ui/gtkpathbar.ui | 2 -
2 files changed, 0 insertions(+), 66 deletions(-)
---
diff --git a/gtk/gtkpathbar.c b/gtk/gtkpathbar.c
index b9fc0ce..ef38e7b 100644
--- a/gtk/gtkpathbar.c
+++ b/gtk/gtkpathbar.c
@@ -133,12 +133,6 @@ static gboolean gtk_path_bar_scroll (GtkWidget *widget,
static void gtk_path_bar_scroll_up (GtkPathBar *path_bar);
static void gtk_path_bar_scroll_down (GtkPathBar *path_bar);
static void gtk_path_bar_stop_scrolling (GtkPathBar *path_bar);
-static gboolean gtk_path_bar_slider_up_defocus (GtkWidget *widget,
- GdkEventButton *event,
- GtkPathBar *path_bar);
-static gboolean gtk_path_bar_slider_down_defocus (GtkWidget *widget,
- GdkEventButton *event,
- GtkPathBar *path_bar);
static gboolean gtk_path_bar_slider_button_press (GtkWidget *widget,
GdkEventButton *event,
GtkPathBar *path_bar);
@@ -258,8 +252,6 @@ gtk_path_bar_class_init (GtkPathBarClass *path_bar_class)
gtk_widget_class_bind_template_callback (widget_class, gtk_path_bar_slider_button_press);
gtk_widget_class_bind_template_callback (widget_class, gtk_path_bar_slider_button_release);
- gtk_widget_class_bind_template_callback (widget_class, gtk_path_bar_slider_up_defocus);
- gtk_widget_class_bind_template_callback (widget_class, gtk_path_bar_slider_down_defocus);
gtk_widget_class_bind_template_callback (widget_class, gtk_path_bar_scroll_up);
gtk_widget_class_bind_template_callback (widget_class, gtk_path_bar_scroll_down);
gtk_widget_class_bind_template_callback (widget_class, on_slider_unmap);
@@ -1083,62 +1075,6 @@ gtk_path_bar_stop_scrolling (GtkPathBar *path_bar)
}
static gboolean
-gtk_path_bar_slider_up_defocus (GtkWidget *widget,
- GdkEventButton *event,
- GtkPathBar *path_bar)
-{
- GList *list;
- GList *up_button = NULL;
-
- if (event->type != GDK_FOCUS_CHANGE)
- return FALSE;
-
- for (list = g_list_last (path_bar->priv->button_list); list; list = list->prev)
- {
- if (gtk_widget_get_child_visible (BUTTON_DATA (list->data)->button))
- {
- up_button = list;
- break;
- }
- }
-
- /* don't let the focus vanish */
- if ((!gtk_widget_is_sensitive (path_bar->priv->up_slider_button)) ||
- (!gtk_widget_get_child_visible (path_bar->priv->up_slider_button)))
- gtk_widget_grab_focus (BUTTON_DATA (up_button->data)->button);
-
- return FALSE;
-}
-
-static gboolean
-gtk_path_bar_slider_down_defocus (GtkWidget *widget,
- GdkEventButton *event,
- GtkPathBar *path_bar)
-{
- GList *list;
- GList *down_button = NULL;
-
- if (event->type != GDK_FOCUS_CHANGE)
- return FALSE;
-
- for (list = path_bar->priv->button_list; list; list = list->next)
- {
- if (gtk_widget_get_child_visible (BUTTON_DATA (list->data)->button))
- {
- down_button = list;
- break;
- }
- }
-
- /* don't let the focus vanish */
- if ((!gtk_widget_is_sensitive (path_bar->priv->down_slider_button)) ||
- (!gtk_widget_get_child_visible (path_bar->priv->down_slider_button)))
- gtk_widget_grab_focus (BUTTON_DATA (down_button->data)->button);
-
- return FALSE;
-}
-
-static gboolean
gtk_path_bar_slider_button_press (GtkWidget *widget,
GdkEventButton *event,
GtkPathBar *path_bar)
diff --git a/gtk/ui/gtkpathbar.ui b/gtk/ui/gtkpathbar.ui
index c41ed7f..f2f624f 100644
--- a/gtk/ui/gtkpathbar.ui
+++ b/gtk/ui/gtkpathbar.ui
@@ -13,7 +13,6 @@
</child>
<signal name="button-press-event" handler="gtk_path_bar_slider_button_press" swapped="no"/>
<signal name="button-release-event" handler="gtk_path_bar_slider_button_release" swapped="no"/>
- <signal name="focus-out-event" handler="gtk_path_bar_slider_down_defocus" swapped="no"/>
<signal name="unmap" handler="on_slider_unmap" swapped="no"/>
<child>
<object class="GtkImage">
@@ -38,7 +37,6 @@
</child>
<signal name="button-press-event" handler="gtk_path_bar_slider_button_press" swapped="no"/>
<signal name="button-release-event" handler="gtk_path_bar_slider_button_release" swapped="no"/>
- <signal name="focus-out-event" handler="gtk_path_bar_slider_up_defocus" swapped="no"/>
<signal name="unmap" handler="on_slider_unmap" swapped="no"/>
<child>
<object class="GtkImage">
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]