[Spice-devel] [spicy PATCH 7/7 v4] spicy: Enable recent chooser on windows
Lukas Venhoda
lvenhoda at redhat.com
Tue Jun 16 02:41:57 PDT 2015
With gtk3, recent chooser is working correctly in windows.
---
Changes since v3
- New patch
---
src/spicy-connect.c | 6 ------
src/spicy.c | 4 ----
2 files changed, 10 deletions(-)
diff --git a/src/spicy-connect.c b/src/spicy-connect.c
index 7834e3a..76675a6 100644
--- a/src/spicy-connect.c
+++ b/src/spicy-connect.c
@@ -104,7 +104,6 @@ static gboolean key_pressed_cb(GtkWidget *widget, GdkEvent *event, gpointer data
return FALSE;
}
-#ifndef G_OS_WIN32
static void recent_selection_changed_dialog_cb(GtkRecentChooser *chooser, gpointer data)
{
GtkRecentInfo *info;
@@ -141,7 +140,6 @@ static void connect_cb(gpointer data)
shutdown_loop(ci->loop);
}
}
-#endif
gboolean spicy_connect_dialog(SpiceSession *session)
{
@@ -223,7 +221,6 @@ gboolean spicy_connect_dialog(SpiceSession *session)
g_signal_connect_swapped(cancel_button, "clicked",
G_CALLBACK(close_cb), &ci);
-#ifndef G_OS_WIN32
GtkRecentFilter *rfilter;
GtkWidget *recent;
@@ -239,17 +236,14 @@ gboolean spicy_connect_dialog(SpiceSession *session)
G_CALLBACK(recent_selection_changed_dialog_cb), session);
g_signal_connect_swapped(recent, "item-activated",
G_CALLBACK(connect_cb), &ci);
-#endif
for (i = 0; i < SPICE_N_ELEMENTS(connect_entries); i++) {
g_signal_connect_swapped(connect_entries[i].entry, "activate",
G_CALLBACK(connect_cb), &ci);
g_signal_connect(connect_entries[i].entry, "changed",
G_CALLBACK(entry_changed_cb), connect_button);
-#ifndef G_OS_WIN32
g_signal_connect(connect_entries[i].entry, "focus-in-event",
G_CALLBACK(entry_focus_in_cb), recent);
-#endif
}
/* show and wait for response */
diff --git a/src/spicy.c b/src/spicy.c
index 3442db0..15ef377 100644
--- a/src/spicy.c
+++ b/src/spicy.c
@@ -810,7 +810,6 @@ static gboolean is_gtk_session_property(const gchar *property)
return FALSE;
}
-#ifndef G_OS_WIN32
static void recent_item_activated_cb(GtkRecentChooser *chooser, gpointer data)
{
GtkRecentInfo *info;
@@ -827,7 +826,6 @@ static void recent_item_activated_cb(GtkRecentChooser *chooser, gpointer data)
gtk_recent_info_unref(info);
connection_connect(conn);
}
-#endif
static gboolean configure_event_cb(GtkWidget *widget,
GdkEventConfigure *event,
@@ -910,7 +908,6 @@ static SpiceWindow *create_spice_window(spice_connection *conn, SpiceChannel *ch
win->ritem = gtk_ui_manager_get_widget
(win->ui, "/MainMenu/FileMenu/FileRecentMenu");
-#ifndef G_OS_WIN32
GtkRecentFilter *rfilter;
win->rmenu = gtk_recent_chooser_menu_new();
@@ -922,7 +919,6 @@ static SpiceWindow *create_spice_window(spice_connection *conn, SpiceChannel *ch
gtk_menu_item_set_submenu(GTK_MENU_ITEM(win->ritem), win->rmenu);
g_signal_connect(win->rmenu, "item-activated",
G_CALLBACK(recent_item_activated_cb), win);
-#endif
/* spice display */
win->spice = GTK_WIDGET(spice_display_new_with_monitor(conn->session, id, monitor_id));
--
2.4.2
More information about the Spice-devel
mailing list