Pass PrefsWindow pointer instead of GtkWindow to prefswindow's open and close callbacks.
authorAndrej Kacian <ticho@claws-mail.org>
Thu, 27 Aug 2015 10:00:00 +0000 (12:00 +0200)
committerAndrej Kacian <ticho@claws-mail.org>
Fri, 28 Aug 2015 09:38:05 +0000 (11:38 +0200)
src/gtk/prefswindow.c
src/gtk/prefswindow.h
src/prefs_folder_item.c

index dfcc41a..16ef9e3 100644 (file)
@@ -133,7 +133,7 @@ static void close_prefs_window(PrefsWindow *prefswindow)
        close_all_pages(prefswindow->prefs_pages);
 
        if (prefswindow->close_cb)
-               prefswindow->close_cb(GTK_WINDOW(prefswindow->window));
+               prefswindow->close_cb(prefswindow);
 
        gtk_widget_destroy(prefswindow->window);
        g_slist_free(prefswindow->prefs_pages);
@@ -484,7 +484,7 @@ void prefswindow_open_full(const gchar *title, GSList *prefs_pages,
                                                        preload_pages);
 
        if (open_cb)
-               open_cb(GTK_WINDOW(prefswindow->window));
+               open_cb(prefswindow);
 
        gtk_widget_grab_focus(prefswindow->tree_view);
 
index d8530a8..20db56d 100644 (file)
@@ -30,8 +30,8 @@ typedef void (*PrefsCreateWidgetFunc) (PrefsPage *, GtkWindow *window, gpointer)
 typedef void (*PrefsDestroyWidgetFunc) (PrefsPage *);
 typedef void (*PrefsSavePageFunc) (PrefsPage *);
 typedef gboolean (*PrefsCanClosePageFunc) (PrefsPage *);
-typedef void (*PrefsOpenCallbackFunc) (GtkWindow *);
-typedef void (*PrefsCloseCallbackFunc) (GtkWindow *);
+typedef void (*PrefsOpenCallbackFunc) (PrefsWindow *);
+typedef void (*PrefsCloseCallbackFunc) (PrefsWindow *);
 
 struct _PrefsPage
 {
index 14309f8..37be0a2 100644 (file)
@@ -1859,14 +1859,14 @@ static void register_templates_page(void)
 
 static GSList *prefs_pages = NULL;
 
-static void prefs_folder_item_address_completion_start(GtkWindow * window)
+static void prefs_folder_item_address_completion_start(PrefsWindow *window)
 {
-       address_completion_start(GTK_WIDGET(window));
+       address_completion_start(window->window);
 }
 
-static void prefs_folder_item_address_completion_end(GtkWindow * window)
+static void prefs_folder_item_address_completion_end(PrefsWindow *window)
 {
-       address_completion_end(GTK_WIDGET(window));
+       address_completion_end(window->window);
 }
 
 void prefs_folder_item_open(FolderItem *item)