Commit 68dcb28b authored by Tristan Van Berkom's avatar Tristan Van Berkom
Browse files

* gladeui/glade-project.[ch]: Removed "previewable" flag/property, now as a GladeWidgetAction

	  of the GtkWidget adaptor this is unneeded and unused.
parent 263af359
......@@ -27,6 +27,9 @@
* gladeui/glade-app.c: Changed session file glade-3.conf -> glade.conf so that session
files dont overlap with parallel installed 3.8.x
* gladeui/glade-project.[ch]: Removed "previewable" flag/property, now as a GladeWidgetAction
of the GtkWidget adaptor this is unneeded and unused.
2011-01-05 Tristan Van Berkom <tristanvb@openismus.com>
* gladeui/Makefile.am, gladeui/glade-signal-class.[ch], gladeui/glade-widget-adaptor.c,
......
......@@ -74,7 +74,6 @@ enum
PROP_HAS_SELECTION,
PROP_PATH,
PROP_READ_ONLY,
PROP_PREVIEWABLE,
PROP_ADD_ITEM,
PROP_POINTER_MODE
};
......@@ -153,7 +152,6 @@ struct _GladeProjectPrivate
guint load_cancel : 1;
guint first_modification_is_na : 1; /* indicates that the first_modification item has been lost */
guint has_selection : 1; /* Whether the project has a selection */
guint previewable : 1;
guint readonly : 1; /* A flag that is set if the project is readonly */
guint loading : 1; /* A flags that is set when the project is loading */
guint modified : 1; /* A flag that is set when a project has unsaved modifications
......@@ -392,9 +390,6 @@ glade_project_get_property (GObject * object,
case PROP_READ_ONLY:
g_value_set_boolean (value, project->priv->readonly);
break;
case PROP_PREVIEWABLE:
g_value_set_boolean (value, project->priv->previewable);
break;
case PROP_ADD_ITEM:
g_value_set_object (value, project->priv->add_item);
break;
......@@ -778,7 +773,6 @@ glade_project_init (GladeProject * project)
priv->preview_channels =
g_hash_table_new_full (g_str_hash, g_str_equal, g_free, NULL);
priv->previewable = FALSE;
priv->toplevel_names = glade_name_context_new ();
priv->naming_policy = GLADE_POLICY_PROJECT_WIDE;
......@@ -1029,15 +1023,6 @@ glade_project_class_init (GladeProjectClass * klass)
FALSE,
G_PARAM_READABLE));
g_object_class_install_property (object_class,
PROP_PREVIEWABLE,
g_param_spec_boolean ("previewable",
_("Previewable"),
_
("Wether the project can be previewed"),
FALSE,
G_PARAM_READABLE));
g_object_class_install_property (object_class,
PROP_ADD_ITEM,
g_param_spec_object ("add-item",
......@@ -2892,34 +2877,6 @@ glade_project_set_widget_name (GladeProject * project,
gtk_tree_path_free (path);
}
static gboolean
glade_project_has_widget (GladeProject * project)
{
GtkWidget *widget = NULL;
const GList *objects;
objects = glade_project_get_objects (project);
while (objects != NULL)
{
if (GTK_IS_WIDGET (objects->data))
{
widget = GTK_WIDGET (objects->data);
break;
}
objects = objects->next;
}
return widget != NULL;
}
static void
glade_project_update_previewable (GladeProject * project)
{
project->priv->previewable = glade_project_has_widget (project);
g_object_notify (G_OBJECT (project), "previewable");
}
static void
glade_project_notify_row_has_child (GladeProject *project,
GladeWidget *gwidget,
......@@ -3048,7 +3005,6 @@ glade_project_add_object (GladeProject * project, GObject * object)
/* Update user visible compatibility info */
glade_project_verify_properties (gwidget);
glade_project_update_previewable (project);
g_signal_emit (G_OBJECT (project),
glade_project_signals[ADD_WIDGET], 0, gwidget);
......@@ -3133,8 +3089,6 @@ glade_project_remove_object (GladeProject * project, GObject * object)
glade_widget_set_project (gwidget, NULL);
glade_widget_set_in_project (gwidget, FALSE);
g_object_unref (gwidget);
glade_project_update_previewable (project);
}
static void
......@@ -3924,12 +3878,6 @@ glade_project_set_naming_policy (GladeProject * project,
}
gboolean
glade_project_get_previewable (GladeProject * project)
{
return project->priv->previewable;
}
GladeNamingPolicy
glade_project_get_naming_policy (GladeProject * project)
{
......
......@@ -192,8 +192,6 @@ gboolean glade_project_is_loading (GladeProject *proj
time_t glade_project_get_file_mtime (GladeProject *project);
gboolean glade_project_get_readonly (GladeProject *project);
gboolean glade_project_get_modified (GladeProject *project);
gboolean glade_project_get_previewable (GladeProject *project);
gboolean glade_project_get_previewable (GladeProject *project);
void glade_project_set_pointer_mode (GladeProject *project,
GladePointerMode mode);
GladePointerMode glade_project_get_pointer_mode (GladeProject *project);
......
Supports Markdown
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