}
#endif
+static void
+adblock_preferences_response_cb (GtkWidget* dialog,
+ gint response,
+ gpointer data)
+{
+ gtk_widget_destroy (dialog);
+}
+
static GtkWidget*
adblock_get_preferences_dialog (MidoriExtension* extension)
{
sokoke_widget_get_text_size (dialog, "M", &width, &height);
gtk_window_set_default_size (GTK_WINDOW (dialog), width * 52, -1);
g_signal_connect (dialog, "response",
- G_CALLBACK (gtk_widget_destroy), dialog);
+ G_CALLBACK (adblock_preferences_response_cb), NULL);
/* TODO: We need mnemonics */
if ((xfce_heading = sokoke_xfce_header_new (
gtk_window_get_icon_name (GTK_WINDOW (dialog)), dialog_title)))
}
}
+static void
+feed_dialog_response_cb (GtkWidget* dialog,
+ gint response,
+ gpointer data)
+{
+ gtk_widget_destroy (dialog);
+}
+
static KatzeArray*
feed_add_item (KatzeArray* feeds,
const gchar* uri)
_("Feed '%s' already exists"), uri);
gtk_window_set_title (GTK_WINDOW (dialog), EXTENSION_NAME);
gtk_widget_show (dialog);
- g_signal_connect_swapped (dialog, "response",
- G_CALLBACK (gtk_widget_destroy), dialog);
+ g_signal_connect (dialog, "response",
+ G_CALLBACK (feed_dialog_response_cb), NULL);
}
else
return FALSE;
}
+static void
+shortcuts_preferences_response_cb (GtkWidget* dialog,
+ gint response,
+ gpointer data)
+{
+ gtk_widget_destroy (dialog);
+}
+
static GtkWidget*
shortcuts_get_preferences_dialog (MidoriExtension* extension)
{
sokoke_widget_get_text_size (dialog, "M", &width, &height);
gtk_window_set_default_size (GTK_WINDOW (dialog), width * 52, height * 24);
g_signal_connect (dialog, "response",
- G_CALLBACK (gtk_widget_destroy), dialog);
+ G_CALLBACK (shortcuts_preferences_response_cb), NULL);
if ((xfce_heading = sokoke_xfce_header_new (
gtk_window_get_icon_name (GTK_WINDOW (dialog)), dialog_title)))
gtk_box_pack_start (GTK_BOX (GTK_DIALOG (dialog)->vbox),
midori_browser_subscribe_to_news_feed (browser, uri);
}
+static void
+_action_compact_add_response_cb (GtkWidget* dialog,
+ gint response,
+ gpointer data)
+{
+ gtk_widget_destroy (dialog);
+}
+
static void
_action_compact_add_activate (GtkAction* action,
MidoriBrowser* browser)
}
gtk_widget_show (dialog);
- g_signal_connect_swapped (dialog, "response",
- G_CALLBACK (gtk_widget_destroy), dialog);
+ g_signal_connect (dialog, "response",
+ G_CALLBACK (_action_compact_add_response_cb), NULL);
}
static void
}
}
+static void
+midori_search_action_dialog_respnse_cb (GtkWidget* dialog,
+ gint response,
+ gpointer data)
+{
+ gtk_widget_destroy (dialog);
+}
+
/**
* midori_search_action_get_dialog:
* @search_action: a #MidoriSearchAction
sokoke_widget_get_text_size (dialog, "M", &width, &height);
gtk_window_set_default_size (GTK_WINDOW (dialog), width * 52, -1);
g_signal_connect (dialog, "response",
- G_CALLBACK (gtk_widget_destroy), dialog);
+ G_CALLBACK (midori_search_action_dialog_respnse_cb), NULL);
/* TODO: Do we want tooltips for explainations or can we omit that?
We need mnemonics */
if ((xfce_heading = sokoke_xfce_header_new (
}
#endif
+static void
+midori_view_print_response_cb (GtkWidget* dialog,
+ gint response,
+ gpointer data)
+{
+ gtk_widget_destroy (dialog);
+}
+
/**
* midori_view_print
* @view: a #MidoriView
g_error_free (error);
g_signal_connect (dialog, "response",
- G_CALLBACK (gtk_widget_destroy), NULL);
+ G_CALLBACK (midori_view_print_response_cb), NULL);
gtk_widget_show (dialog);
}
#else
return value;
}
+static void
+sokoke_message_dialog_response_cb (GtkWidget* dialog,
+ gint response,
+ gpointer data)
+{
+ gtk_widget_destroy (dialog);
+}
+
void
sokoke_message_dialog (GtkMessageType message_type,
const gchar* short_message,
"%s", short_message);
gtk_message_dialog_format_secondary_text (GTK_MESSAGE_DIALOG (dialog),
"%s", detailed_message);
- g_signal_connect_swapped (dialog, "response",
- G_CALLBACK (gtk_widget_destroy), dialog);
+ g_signal_connect (dialog, "response",
+ G_CALLBACK (sokoke_message_dialog_response_cb), NULL);
gtk_widget_show (dialog);
}