Fix full screen open menu to set right recent menu limit

parent bfe64c3a
......@@ -106,6 +106,7 @@ gedit_open_menu_button_set_property (GObject *object,
{
case PROP_LIMIT:
priv->limit = g_value_get_int (value);
set_recent_menu (button);
break;
default:
G_OBJECT_WARN_INVALID_PROPERTY_ID (object, prop_id, pspec);
......@@ -113,16 +114,6 @@ gedit_open_menu_button_set_property (GObject *object,
}
}
static void
gedit_open_menu_button_constructed (GObject *object)
{
GeditOpenMenuButton *button = GEDIT_OPEN_MENU_BUTTON (object);
set_recent_menu (button);
G_OBJECT_CLASS (gedit_open_menu_button_parent_class)->constructed (object);
}
static void
gedit_open_menu_button_init (GeditOpenMenuButton *button)
{
......@@ -140,7 +131,6 @@ gedit_open_menu_button_class_init (GeditOpenMenuButtonClass *klass)
object_class->dispose = gedit_open_menu_button_dispose;
object_class->get_property = gedit_open_menu_button_get_property;
object_class->set_property = gedit_open_menu_button_set_property;
object_class->constructed = gedit_open_menu_button_constructed;
g_object_class_install_property (object_class, PROP_LIMIT,
g_param_spec_int ("limit",
......
......@@ -65,6 +65,7 @@ struct _GeditWindowPrivate
/* Widgets for fullscreen mode */
GtkWidget *fullscreen_controls;
GtkWidget *fullscreen_open_menu;
GtkMenuButton *fullscreen_gear_button;
gboolean fullscreen_controls_setup;
guint fullscreen_animation_timeout_id;
......
......@@ -435,6 +435,7 @@ gedit_window_class_init (GeditWindowClass *klass)
gtk_widget_class_bind_template_child_private (widget_class, GeditWindow, bottom_panel);
gtk_widget_class_bind_template_child_private (widget_class, GeditWindow, statusbar);
gtk_widget_class_bind_template_child_private (widget_class, GeditWindow, fullscreen_controls);
gtk_widget_class_bind_template_child_private (widget_class, GeditWindow, fullscreen_open_menu);
gtk_widget_class_bind_template_child_private (widget_class, GeditWindow, fullscreen_gear_button);
}
......@@ -2039,6 +2040,12 @@ fullscreen_controls_setup (GeditWindow *window)
"win",
G_ACTION_GROUP (window));
g_settings_bind (window->priv->ui_settings,
GEDIT_SETTINGS_MAX_RECENTS,
window->priv->fullscreen_open_menu,
"limit",
G_SETTINGS_BIND_GET);
g_signal_connect (priv->fullscreen_controls, "enter-notify-event",
G_CALLBACK (on_fullscreen_controls_enter_notify_event),
window);
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment