forked from AuroraMiddleware/gtk
Merge branch 'inspector-work' into 'master'
Inspector work See merge request GNOME/gtk!724
This commit is contained in:
commit
b678d12c2d
@ -2953,6 +2953,9 @@ gtk_widget_root (GtkWidget *widget)
|
||||
|
||||
priv->root = priv->parent->priv->root;
|
||||
|
||||
if (priv->context)
|
||||
gtk_style_context_set_display (priv->context, gtk_root_get_display (priv->root));
|
||||
|
||||
GTK_WIDGET_GET_CLASS (widget)->root (widget);
|
||||
|
||||
g_object_notify_by_pspec (G_OBJECT (widget), widget_props[PROP_ROOT]);
|
||||
@ -2972,6 +2975,9 @@ gtk_widget_unroot (GtkWidget *widget)
|
||||
|
||||
GTK_WIDGET_GET_CLASS (widget)->unroot (widget);
|
||||
|
||||
if (priv->context)
|
||||
gtk_style_context_set_display (priv->context, gdk_display_get_default ());
|
||||
|
||||
priv->root = NULL;
|
||||
|
||||
g_object_notify_by_pspec (G_OBJECT (widget), widget_props[PROP_ROOT]);
|
||||
|
@ -119,8 +119,9 @@ set_initial_text (GtkInspectorCssEditor *ce)
|
||||
|
||||
autosave_file = get_autosave_path ();
|
||||
|
||||
g_file_get_contents (autosave_file, &initial_text, &len, NULL);
|
||||
if (!initial_text)
|
||||
if (g_file_get_contents (autosave_file, &initial_text, &len, NULL))
|
||||
gtk_toggle_button_set_active (GTK_TOGGLE_BUTTON (ce->priv->disable_button), TRUE);
|
||||
else
|
||||
initial_text = g_strconcat ("/*\n",
|
||||
_("You can type here any CSS rule recognized by GTK."), "\n",
|
||||
_("You can temporarily disable this custom CSS by clicking on the “Pause” button above."), "\n\n",
|
||||
|
Loading…
Reference in New Issue
Block a user