From c8332ddf548fd11b899247b0321b0daf571f7bba Mon Sep 17 00:00:00 2001 From: Christian Dywan Date: Mon, 24 Mar 2008 14:15:23 +0100 Subject: [PATCH] Fix panel close button. --- src/midori-browser.c | 16 ++++++++-------- src/midori-panel.c | 22 ++++++++++++++-------- 2 files changed, 22 insertions(+), 16 deletions(-) diff --git a/src/midori-browser.c b/src/midori-browser.c index ea7652b2..afb2acd6 100644 --- a/src/midori-browser.c +++ b/src/midori-browser.c @@ -477,9 +477,9 @@ static void midori_browser_class_init (MidoriBrowserClass* class) { - signals[QUIT] = g_signal_new( + signals[QUIT] = g_signal_new ( "quit", - G_TYPE_FROM_CLASS(class), + G_TYPE_FROM_CLASS (class), (GSignalFlags)(G_SIGNAL_RUN_LAST | G_SIGNAL_ACTION), 0, 0, @@ -487,9 +487,9 @@ midori_browser_class_init (MidoriBrowserClass* class) g_cclosure_marshal_VOID__VOID, G_TYPE_NONE, 0); - signals[NEW_WINDOW] = g_signal_new( + signals[NEW_WINDOW] = g_signal_new ( "new-window", - G_TYPE_FROM_CLASS(class), + G_TYPE_FROM_CLASS (class), (GSignalFlags)(G_SIGNAL_RUN_LAST | G_SIGNAL_ACTION), G_STRUCT_OFFSET (MidoriBrowserClass, new_window), 0, @@ -1716,8 +1716,8 @@ _action_bookmark_open_activate (GtkAction* action, KatzeXbelItem* item; gtk_tree_model_get (model, &iter, 0, &item, -1); if (katze_xbel_item_is_bookmark (item)) - g_object_set(midori_browser_get_current_web_view (browser), - "uri", katze_xbel_bookmark_get_href(item), NULL); + g_object_set (midori_browser_get_current_web_view (browser), + "uri", katze_xbel_bookmark_get_href(item), NULL); } } } @@ -2019,7 +2019,7 @@ static const GtkActionEntry entries[] = { NULL, "", "hm?", G_CALLBACK (_action_about_activate) }, }; - static const guint entries_n = G_N_ELEMENTS(entries); + static const guint entries_n = G_N_ELEMENTS (entries); static const GtkToggleActionEntry toggle_entries[] = { { "PrivateBrowsing", NULL, @@ -2052,7 +2052,7 @@ static const GtkToggleActionEntry toggle_entries[] = { "hm?", G_CALLBACK (_action_statusbar_activate), FALSE }, }; - static const guint toggle_entries_n = G_N_ELEMENTS(toggle_entries); + static const guint toggle_entries_n = G_N_ELEMENTS (toggle_entries); static void midori_browser_window_state_event_cb (MidoriBrowser* browser, diff --git a/src/midori-panel.c b/src/midori-panel.c index d58ad323..7c6860ba 100644 --- a/src/midori-panel.c +++ b/src/midori-panel.c @@ -71,30 +71,35 @@ midori_panel_close_cb (MidoriPanel* panel) } static void -midori_cclosure_marshal_BOOLEAN__VOID (GClosure* closure, GValue* return_value, guint n_param_values, const GValue *param_values, gpointer invocation_hint, gpointer marshal_data) +midori_cclosure_marshal_BOOLEAN__VOID (GClosure* closure, + GValue* return_value, + guint n_param_values, + const GValue* param_values, + gpointer invocation_hint, + gpointer marshal_data) { typedef gboolean(*GMarshalFunc_BOOLEAN__VOID) (gpointer data1, - gpointer data2); + gpointer data2); register GMarshalFunc_BOOLEAN__VOID callback; register GCClosure* cc = (GCClosure*) closure; register gpointer data1, data2; gboolean v_return; - g_return_if_fail(return_value != NULL); - g_return_if_fail(n_param_values == 1); + g_return_if_fail (return_value != NULL); + g_return_if_fail (n_param_values == 1); if (G_CCLOSURE_SWAP_DATA (closure)) { data1 = closure->data; - data2 = g_value_peek_pointer(param_values + 0); + data2 = g_value_peek_pointer (param_values + 0); } else { - data1 = g_value_peek_pointer(param_values + 0); + data1 = g_value_peek_pointer (param_values + 0); data2 = closure->data; } callback = (GMarshalFunc_BOOLEAN__VOID) (marshal_data ? marshal_data : cc->callback); - v_return = callback(data1, data2); + v_return = callback (data1, data2); g_value_set_boolean (return_value, v_return); } @@ -164,7 +169,8 @@ midori_panel_class_init (MidoriPanelClass* class) } static void -midori_panel_button_close_clicked_cb (MidoriPanel* panel) +midori_panel_button_close_clicked_cb (GtkWidget* toolitem, + MidoriPanel* panel) { g_signal_emit (panel, signals[CLOSE], 0); }