placesview: Avoid the use of popup-menu

This commit is contained in:
Matthias Clasen
2019-06-24 01:33:31 +00:00
parent f9c670b7c6
commit 0dccb3de40
4 changed files with 6 additions and 8 deletions

View File

@@ -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

View File

@@ -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 */

View File

@@ -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

View File

@@ -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