Fix panel close button.
This commit is contained in:
parent
fea97e80c3
commit
c8332ddf54
2 changed files with 22 additions and 16 deletions
|
@ -477,9 +477,9 @@ static void
|
||||||
midori_browser_class_init (MidoriBrowserClass* class)
|
midori_browser_class_init (MidoriBrowserClass* class)
|
||||||
{
|
{
|
||||||
|
|
||||||
signals[QUIT] = g_signal_new(
|
signals[QUIT] = g_signal_new (
|
||||||
"quit",
|
"quit",
|
||||||
G_TYPE_FROM_CLASS(class),
|
G_TYPE_FROM_CLASS (class),
|
||||||
(GSignalFlags)(G_SIGNAL_RUN_LAST | G_SIGNAL_ACTION),
|
(GSignalFlags)(G_SIGNAL_RUN_LAST | G_SIGNAL_ACTION),
|
||||||
0,
|
0,
|
||||||
0,
|
0,
|
||||||
|
@ -487,9 +487,9 @@ midori_browser_class_init (MidoriBrowserClass* class)
|
||||||
g_cclosure_marshal_VOID__VOID,
|
g_cclosure_marshal_VOID__VOID,
|
||||||
G_TYPE_NONE, 0);
|
G_TYPE_NONE, 0);
|
||||||
|
|
||||||
signals[NEW_WINDOW] = g_signal_new(
|
signals[NEW_WINDOW] = g_signal_new (
|
||||||
"new-window",
|
"new-window",
|
||||||
G_TYPE_FROM_CLASS(class),
|
G_TYPE_FROM_CLASS (class),
|
||||||
(GSignalFlags)(G_SIGNAL_RUN_LAST | G_SIGNAL_ACTION),
|
(GSignalFlags)(G_SIGNAL_RUN_LAST | G_SIGNAL_ACTION),
|
||||||
G_STRUCT_OFFSET (MidoriBrowserClass, new_window),
|
G_STRUCT_OFFSET (MidoriBrowserClass, new_window),
|
||||||
0,
|
0,
|
||||||
|
@ -1716,8 +1716,8 @@ _action_bookmark_open_activate (GtkAction* action,
|
||||||
KatzeXbelItem* item;
|
KatzeXbelItem* item;
|
||||||
gtk_tree_model_get (model, &iter, 0, &item, -1);
|
gtk_tree_model_get (model, &iter, 0, &item, -1);
|
||||||
if (katze_xbel_item_is_bookmark (item))
|
if (katze_xbel_item_is_bookmark (item))
|
||||||
g_object_set(midori_browser_get_current_web_view (browser),
|
g_object_set (midori_browser_get_current_web_view (browser),
|
||||||
"uri", katze_xbel_bookmark_get_href(item), NULL);
|
"uri", katze_xbel_bookmark_get_href(item), NULL);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -2019,7 +2019,7 @@ static const GtkActionEntry entries[] = {
|
||||||
NULL, "",
|
NULL, "",
|
||||||
"hm?", G_CALLBACK (_action_about_activate) },
|
"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[] = {
|
static const GtkToggleActionEntry toggle_entries[] = {
|
||||||
{ "PrivateBrowsing", NULL,
|
{ "PrivateBrowsing", NULL,
|
||||||
|
@ -2052,7 +2052,7 @@ static const GtkToggleActionEntry toggle_entries[] = {
|
||||||
"hm?", G_CALLBACK (_action_statusbar_activate),
|
"hm?", G_CALLBACK (_action_statusbar_activate),
|
||||||
FALSE },
|
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
|
static void
|
||||||
midori_browser_window_state_event_cb (MidoriBrowser* browser,
|
midori_browser_window_state_event_cb (MidoriBrowser* browser,
|
||||||
|
|
|
@ -71,30 +71,35 @@ midori_panel_close_cb (MidoriPanel* panel)
|
||||||
}
|
}
|
||||||
|
|
||||||
static void
|
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,
|
typedef gboolean(*GMarshalFunc_BOOLEAN__VOID) (gpointer data1,
|
||||||
gpointer data2);
|
gpointer data2);
|
||||||
register GMarshalFunc_BOOLEAN__VOID callback;
|
register GMarshalFunc_BOOLEAN__VOID callback;
|
||||||
register GCClosure* cc = (GCClosure*) closure;
|
register GCClosure* cc = (GCClosure*) closure;
|
||||||
register gpointer data1, data2;
|
register gpointer data1, data2;
|
||||||
gboolean v_return;
|
gboolean v_return;
|
||||||
|
|
||||||
g_return_if_fail(return_value != NULL);
|
g_return_if_fail (return_value != NULL);
|
||||||
g_return_if_fail(n_param_values == 1);
|
g_return_if_fail (n_param_values == 1);
|
||||||
|
|
||||||
if (G_CCLOSURE_SWAP_DATA (closure))
|
if (G_CCLOSURE_SWAP_DATA (closure))
|
||||||
{
|
{
|
||||||
data1 = closure->data;
|
data1 = closure->data;
|
||||||
data2 = g_value_peek_pointer(param_values + 0);
|
data2 = g_value_peek_pointer (param_values + 0);
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
data1 = g_value_peek_pointer(param_values + 0);
|
data1 = g_value_peek_pointer (param_values + 0);
|
||||||
data2 = closure->data;
|
data2 = closure->data;
|
||||||
}
|
}
|
||||||
callback = (GMarshalFunc_BOOLEAN__VOID) (marshal_data ? marshal_data : cc->callback);
|
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);
|
g_value_set_boolean (return_value, v_return);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -164,7 +169,8 @@ midori_panel_class_init (MidoriPanelClass* class)
|
||||||
}
|
}
|
||||||
|
|
||||||
static void
|
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);
|
g_signal_emit (panel, signals[CLOSE], 0);
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in a new issue