From 58cb93d9005b582cf77fee32219b0a8784c94317 Mon Sep 17 00:00:00 2001 From: Christian Dywan Date: Tue, 18 Nov 2008 23:10:21 +0100 Subject: [PATCH] Use katze_object_get_foo instead of sokoke_object_get_foo --- midori/midori-browser.c | 22 +++++++++++----------- midori/midori-locationaction.c | 1 - midori/midori-locationentry.c | 2 +- midori/sokoke.c | 28 ---------------------------- midori/sokoke.h | 8 -------- 5 files changed, 12 insertions(+), 49 deletions(-) diff --git a/midori/midori-browser.c b/midori/midori-browser.c index 496e3ff6..a6a6f646 100644 --- a/midori/midori-browser.c +++ b/midori/midori-browser.c @@ -253,8 +253,8 @@ _midori_browser_update_interface (MidoriBrowser* browser) "tooltip", _("Reload the current page"), "sensitive", can_reload, NULL); gtk_widget_hide (browser->progressbar); - if (!sokoke_object_get_boolean (browser->settings, "show-navigationbar") - && !sokoke_object_get_boolean (browser->settings, "show-statusbar")) + if (!katze_object_get_boolean (browser->settings, "show-navigationbar") + && !katze_object_get_boolean (browser->settings, "show-statusbar")) gtk_widget_hide (browser->navigationbar); } else @@ -298,7 +298,7 @@ static void _midori_browser_set_current_page_smartly (MidoriBrowser* browser, gint n) { - if (!sokoke_object_get_boolean (browser->settings, + if (!katze_object_get_boolean (browser->settings, "open-tabs-in-the-background")) midori_browser_set_current_page (browser, n); } @@ -356,7 +356,7 @@ midori_view_notify_icon_cb (MidoriView* view, uri = midori_view_get_display_uri (MIDORI_VIEW (view)); action = _action_by_name (browser, "Location"); - if (sokoke_object_get_boolean (browser->settings, "remember-last-visited-pages")) + if (katze_object_get_boolean (browser->settings, "remember-last-visited-pages")) midori_location_action_set_icon_for_uri ( MIDORI_LOCATION_ACTION (action), midori_view_get_icon (view), uri); } @@ -375,7 +375,7 @@ midori_view_notify_load_status_cb (GtkWidget* view, if (midori_view_get_load_status (MIDORI_VIEW (view)) == MIDORI_LOAD_COMMITTED) { - if (sokoke_object_get_boolean (browser->settings, + if (katze_object_get_boolean (browser->settings, "remember-last-visited-pages")) midori_location_action_add_uri (MIDORI_LOCATION_ACTION (action), uri); } @@ -445,7 +445,7 @@ midori_view_notify_title_cb (GtkWidget* view, uri = midori_view_get_display_uri (MIDORI_VIEW (view)); title = midori_view_get_display_title (MIDORI_VIEW (view)); action = _action_by_name (browser, "Location"); - if (sokoke_object_get_boolean (browser->settings, "remember-last-visited-pages")) + if (katze_object_get_boolean (browser->settings, "remember-last-visited-pages")) midori_location_action_set_title_for_uri ( MIDORI_LOCATION_ACTION (action), title, uri); if (midori_view_get_load_status (MIDORI_VIEW (view)) == MIDORI_LOAD_COMMITTED) @@ -910,7 +910,7 @@ _midori_browser_add_tab (MidoriBrowser* browser, g_signal_connect (view, "leave-notify-event", G_CALLBACK (midori_browser_tab_leave_notify_event_cb), browser); - if (sokoke_object_get_boolean (browser->settings, "open-tabs-next-to-current")) + if (katze_object_get_boolean (browser->settings, "open-tabs-next-to-current")) { n = gtk_notebook_get_current_page (GTK_NOTEBOOK (browser->notebook)); gtk_notebook_insert_page (GTK_NOTEBOOK (browser->notebook), view, @@ -1963,7 +1963,7 @@ static void _action_location_activate (GtkAction* action, MidoriBrowser* browser) { - if (!sokoke_object_get_boolean (browser->settings, "show-navigationbar")) + if (!katze_object_get_boolean (browser->settings, "show-navigationbar")) gtk_widget_show (browser->navigationbar); } @@ -1985,7 +1985,7 @@ static void _action_location_focus_out (GtkAction* action, MidoriBrowser* browser) { - if (!sokoke_object_get_boolean (browser->settings, "show-navigationbar")) + if (!katze_object_get_boolean (browser->settings, "show-navigationbar")) gtk_widget_hide (browser->navigationbar); } @@ -2162,7 +2162,7 @@ _action_search_focus_out (GtkAction* action, MidoriBrowser* browser) { if (GTK_WIDGET_VISIBLE (browser->statusbar) && - !sokoke_object_get_boolean (browser->settings, "show-navigationbar")) + !katze_object_get_boolean (browser->settings, "show-navigationbar")) gtk_widget_hide (browser->navigationbar); } @@ -3541,7 +3541,7 @@ midori_browser_new_history_item (MidoriBrowser* browser, gint age; gint newage; - if (!sokoke_object_get_boolean (browser->settings, "remember-last-visited-pages")) + if (!katze_object_get_boolean (browser->settings, "remember-last-visited-pages")) return; treeview = GTK_TREE_VIEW (browser->panel_history); diff --git a/midori/midori-locationaction.c b/midori/midori-locationaction.c index 51af271c..f3a952ff 100644 --- a/midori/midori-locationaction.c +++ b/midori/midori-locationaction.c @@ -409,7 +409,6 @@ midori_location_entry_render_text_cb (GtkCellLayout* layout, gchar* skey; gchar* temp; gchar** parts; - glong len; gtk_tree_model_get (model, iter, URI_COL, &uri, TITLE_COL, &title, -1); diff --git a/midori/midori-locationentry.c b/midori/midori-locationentry.c index 3f4dd2a8..eceb4b56 100644 --- a/midori/midori-locationentry.c +++ b/midori/midori-locationentry.c @@ -415,7 +415,7 @@ entry_key_press_event (GtkWidget* widget, case GDK_Down: case GDK_Up: { - if (!sokoke_object_get_boolean (location_entry, "popup-shown")) + if (!katze_object_get_boolean (location_entry, "popup-shown")) gtk_combo_box_popup (GTK_COMBO_BOX (location_entry)); return TRUE; } diff --git a/midori/sokoke.c b/midori/sokoke.c index e052fbfd..b0620673 100644 --- a/midori/sokoke.c +++ b/midori/sokoke.c @@ -498,34 +498,6 @@ sokoke_widget_get_text_size (GtkWidget* widget, g_object_unref (layout); } -gint -sokoke_object_get_int (gpointer object, - const gchar* property) -{ - gint value = 0; - - g_return_val_if_fail (object != NULL, FALSE); - g_return_val_if_fail (G_IS_OBJECT (object), FALSE); - /* FIXME: Check value type */ - - g_object_get (object, property, &value, NULL); - return value; -} - -gboolean -sokoke_object_get_boolean (gpointer object, - const gchar* property) -{ - gboolean value = FALSE; - - g_return_val_if_fail (object != NULL, FALSE); - g_return_val_if_fail (G_IS_OBJECT (object), FALSE); - /* FIXME: Check value type */ - - g_object_get (object, property, &value, NULL); - return value; -} - /** * sokoke_action_create_popup_menu_item: * @action: a #GtkAction diff --git a/midori/sokoke.h b/midori/sokoke.h index 526e9b3f..3f7d5a71 100644 --- a/midori/sokoke.h +++ b/midori/sokoke.h @@ -115,14 +115,6 @@ sokoke_widget_get_text_size (GtkWidget* widget, gint* width, gint* height); -gint -sokoke_object_get_int (gpointer object, - const gchar* property); - -gboolean -sokoke_object_get_boolean (gpointer object, - const gchar* property); - GtkWidget* sokoke_action_create_popup_menu_item (GtkAction* action);