Use the new midori_extension_get_app in extensions
This commit is contained in:
parent
331537201a
commit
8ff4ff5909
2 changed files with 20 additions and 0 deletions
|
@ -13,6 +13,11 @@
|
||||||
|
|
||||||
#define STOCK_PAGE_HOLDER "page-holder"
|
#define STOCK_PAGE_HOLDER "page-holder"
|
||||||
|
|
||||||
|
static void
|
||||||
|
page_holder_app_add_browser_cb (MidoriApp* app,
|
||||||
|
MidoriBrowser* browser,
|
||||||
|
MidoriExtension* extension);
|
||||||
|
|
||||||
static gint
|
static gint
|
||||||
page_holder_notebook_append_view (GtkWidget* notebook)
|
page_holder_notebook_append_view (GtkWidget* notebook)
|
||||||
{
|
{
|
||||||
|
@ -68,7 +73,13 @@ static void
|
||||||
page_holder_deactivate_cb (MidoriExtension* extension,
|
page_holder_deactivate_cb (MidoriExtension* extension,
|
||||||
GtkWidget* notebook)
|
GtkWidget* notebook)
|
||||||
{
|
{
|
||||||
|
MidoriApp* app = midori_extension_get_app (extension);
|
||||||
|
|
||||||
gtk_widget_destroy (notebook);
|
gtk_widget_destroy (notebook);
|
||||||
|
g_signal_handlers_disconnect_by_func (
|
||||||
|
extension, page_holder_deactivate_cb, notebook);
|
||||||
|
g_signal_handlers_disconnect_by_func (
|
||||||
|
app, page_holder_app_add_browser_cb, extension);
|
||||||
}
|
}
|
||||||
|
|
||||||
static void
|
static void
|
||||||
|
|
|
@ -11,13 +11,22 @@
|
||||||
|
|
||||||
#include <midori/midori.h>
|
#include <midori/midori.h>
|
||||||
|
|
||||||
|
static void
|
||||||
|
statusbar_features_app_add_browser_cb (MidoriApp* app,
|
||||||
|
MidoriBrowser* browser,
|
||||||
|
MidoriExtension* extension);
|
||||||
|
|
||||||
static void
|
static void
|
||||||
statusbar_features_deactivate_cb (MidoriExtension* extension,
|
statusbar_features_deactivate_cb (MidoriExtension* extension,
|
||||||
GtkWidget* bbox)
|
GtkWidget* bbox)
|
||||||
{
|
{
|
||||||
|
MidoriApp* app = midori_extension_get_app (extension);
|
||||||
|
|
||||||
gtk_widget_destroy (bbox);
|
gtk_widget_destroy (bbox);
|
||||||
g_signal_handlers_disconnect_by_func (
|
g_signal_handlers_disconnect_by_func (
|
||||||
extension, statusbar_features_deactivate_cb, bbox);
|
extension, statusbar_features_deactivate_cb, bbox);
|
||||||
|
g_signal_handlers_disconnect_by_func (
|
||||||
|
app, statusbar_features_app_add_browser_cb, extension);
|
||||||
}
|
}
|
||||||
|
|
||||||
static void
|
static void
|
||||||
|
|
Loading…
Reference in a new issue