[gtk/shortcuts-rebased-again: 151/171] placesview: Avoid the use of popup-menu
- From: Matthias Clasen <matthiasc src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [gtk/shortcuts-rebased-again: 151/171] placesview: Avoid the use of popup-menu
- Date: Mon, 24 Jun 2019 23:17:11 +0000 (UTC)
commit 0dccb3de40344638d0a36a41b0106696ceef79ae
Author: Matthias Clasen <mclasen redhat com>
Date: Mon Jun 24 01:33:31 2019 +0000
placesview: Avoid the use of popup-menu
gtk/gtkplacesview.c | 9 ++-------
gtk/gtkplacesviewprivate.h | 2 ++
gtk/gtkplacesviewrow.c | 2 +-
gtk/gtkplacesviewrowprivate.h | 1 +
4 files changed, 6 insertions(+), 8 deletions(-)
---
diff --git a/gtk/gtkplacesview.c b/gtk/gtkplacesview.c
index 75c4af2372..38ebe6591c 100644
--- a/gtk/gtkplacesview.c
+++ b/gtk/gtkplacesview.c
@@ -104,8 +104,6 @@ static void mount_volume (GtkPlacesView
static void on_eject_button_clicked (GtkWidget *widget,
GtkPlacesViewRow *row);
-static gboolean on_row_popup_menu (GtkPlacesViewRow *row);
-
static void populate_servers (GtkPlacesView *view);
static gboolean gtk_places_view_get_fetching_networks (GtkPlacesView *view);
@@ -666,8 +664,6 @@ insert_row (GtkPlacesView *view,
g_object_set_data (G_OBJECT (row), "is-network", GINT_TO_POINTER (is_network));
- g_signal_connect (row, "popup-menu", G_CALLBACK (on_row_popup_menu), row);
-
g_signal_connect (gtk_places_view_row_get_eject_button (GTK_PLACES_VIEW_ROW (row)),
"clicked",
G_CALLBACK (on_eject_button_clicked),
@@ -1733,11 +1729,10 @@ popup_menu (GtkPlacesViewRow *row,
gtk_menu_popup_at_pointer (GTK_MENU (priv->popup_menu), (GdkEvent *) event);
}
-static gboolean
-on_row_popup_menu (GtkPlacesViewRow *row)
+void
+gtk_places_view_row_popup_menu (GtkPlacesViewRow *row)
{
popup_menu (row, NULL);
- return TRUE;
}
static gboolean
diff --git a/gtk/gtkplacesviewprivate.h b/gtk/gtkplacesviewprivate.h
index 9400efa8b2..ad6ce78453 100644
--- a/gtk/gtkplacesviewprivate.h
+++ b/gtk/gtkplacesviewprivate.h
@@ -81,6 +81,8 @@ gboolean gtk_places_view_get_loading (GtkPlacesView
GtkWidget * gtk_places_view_new (void);
+
+
G_END_DECLS
#endif /* GTK_PLACES_VIEW_H */
diff --git a/gtk/gtkplacesviewrow.c b/gtk/gtkplacesviewrow.c
index 79e30c9d7e..77e883109d 100644
--- a/gtk/gtkplacesviewrow.c
+++ b/gtk/gtkplacesviewrow.c
@@ -200,7 +200,7 @@ pressed_cb (GtkGesture *gesture,
double y,
GtkPlacesViewRow *row)
{
- g_signal_emit_by_name (row, "popup-menu", 0);
+ gtk_places_view_row_popup_menu (row);
}
static void
diff --git a/gtk/gtkplacesviewrowprivate.h b/gtk/gtkplacesviewrowprivate.h
index ad913275a1..b15c60942b 100644
--- a/gtk/gtkplacesviewrowprivate.h
+++ b/gtk/gtkplacesviewrowprivate.h
@@ -57,6 +57,7 @@ void gtk_places_view_row_set_path_size_group (GtkPlacesViewR
void gtk_places_view_row_set_space_size_group (GtkPlacesViewRow *row,
GtkSizeGroup *group);
+void gtk_places_view_row_popup_menu (GtkPlacesViewRow *row);
G_END_DECLS
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]