g_list_free (app->browsers);
g_object_unref (app->accel_group);
- if (app->settings)
- g_object_unref (app->settings);
- if (app->bookmarks)
- g_object_unref (app->bookmarks);
- if (app->trash)
- g_object_unref (app->trash);
- if (app->search_engines)
- g_object_unref (app->search_engines);
- if (app->history)
- g_object_unref (app->history);
+ katze_object_assign (app->settings, NULL);
+ katze_object_assign (app->bookmarks, NULL);
+ katze_object_assign (app->trash, NULL);
+ katze_object_assign (app->search_engines, NULL);
+ katze_object_assign (app->history, NULL);
- if (app->instance)
- g_object_unref (app->instance);
+ katze_object_assign (app->instance, NULL);
G_OBJECT_CLASS (midori_app_parent_class)->finalize (object);
}
switch (prop_id)
{
case PROP_SETTINGS:
- katze_object_assign (app->settings, g_value_get_object (value));
- g_object_ref (app->settings);
+ katze_object_assign (app->settings, g_value_dup_object (value));
/* FIXME: Propagate settings to all browsers */
break;
case PROP_BOOKMARKS:
- katze_object_assign (app->bookmarks, g_value_get_object (value));
- g_object_ref (app->bookmarks);
+ katze_object_assign (app->bookmarks, g_value_dup_object (value));
/* FIXME: Propagate bookmarks to all browsers */
break;
case PROP_TRASH:
- katze_object_assign (app->trash, g_value_get_object (value));
- g_object_ref (app->trash);
+ katze_object_assign (app->trash, g_value_dup_object (value));
/* FIXME: Propagate trash to all browsers */
break;
case PROP_SEARCH_ENGINES:
- katze_object_assign (app->search_engines, g_value_get_object (value));
- g_object_ref (app->search_engines);
+ katze_object_assign (app->search_engines, g_value_dup_object (value));
/* FIXME: Propagate search engines to all browsers */
break;
case PROP_HISTORY:
- katze_object_assign (app->history, g_value_get_object (value));
+ katze_object_assign (app->history, g_value_dup_object (value));
/* FIXME: Propagate history to all browsers */
break;
default:
g_value_get_enum (value));
break;
case PROP_MENU:
- katze_object_assign (panel->menu, g_value_get_object (value));
+ katze_object_assign (panel->menu, g_value_dup_object (value));
/* FIXME: Move existing items to the new menu */
break;
case PROP_PAGE:
#include "sokoke.h"
+#include <string.h>
#include <glib/gi18n.h>
struct _MidoriPreferences
web_frame, js_context, js_window);
}
+static void
+webkit_web_view_destroy_cb (GtkWidget* web_view,
+ WebKitWebFrame* web_frame)
+{
+ g_signal_handlers_disconnect_by_func (web_frame,
+ webkit_web_frame_load_done_cb, gtk_widget_get_parent (web_view));
+}
+
static void
midori_view_init (MidoriView* view)
{
midori_view_finalize (GObject* object)
{
MidoriView* view;
- /* WebKitWebFrame* web_frame; */
view = MIDORI_VIEW (object);
katze_object_assign (view->net, NULL);
- /* web_frame = webkit_web_view_get_main_frame
- (WEBKIT_WEB_VIEW (view->web_view));
- g_signal_handlers_disconnect_by_func (web_frame,
- webkit_web_frame_load_done, view); */
-
G_OBJECT_CLASS (midori_view_parent_class)->finalize (object);
}
katze_assign (view->statusbar_text, g_value_dup_string (value));
break;
case PROP_SETTINGS:
- midori_view_set_settings (view, g_value_get_object (value));
+ midori_view_set_settings (view, g_value_dup_object (value));
break;
case PROP_NET:
katze_object_assign (view->net, g_value_dup_object (value));
webkit_web_view_console_message_cb, view,
"signal::window-object-cleared",
webkit_web_view_window_object_cleared_cb, view,
+ "signal::destroy",
+ webkit_web_view_destroy_cb, web_frame,
NULL);
g_object_connect (web_frame,
"signal::load-done",
import pproc as subprocess
import os
+APPNAME = 'midori'
+
if bld.env ()['INTLTOOL_UPDATE']:
os.chdir ('./po')
try:
try:
- size_old = os.stat ('midori.pot').st_size
+ size_old = os.stat (APPNAME + '.pot').st_size
except:
size_old = 0
subprocess.call (['intltool-update', '--pot'])
- size_new = os.stat ('midori.pot').st_size
+ size_new = os.stat (APPNAME + '.pot').st_size
if size_new <> size_old:
Params.pprint ('YELLOW', "Updated po template.")
try:
os.chdir ('..')
obj = bld.create_obj ('intltool_po')
-obj.appname = 'midori'
+obj.appname = APPNAME