Commit 3eb37dae authored by Tristan Van Berkom's avatar Tristan Van Berkom

Added padding on top of undocked tools, removed custom label handling of


	* src/glade-window.c: Added padding on top of undocked tools, removed
	custom label handling of widget name.

	* gladeui/glade-editor-property.c: Adapted and applied Thomas Rydzynski's patch
	so that text wraps in property editor (bug 351902)

	* gladeui/glade-editor.c: Trash the class entry and put a class header
	on the whole editor widget, fixed a bug on my signal disconnections.


svn path=/trunk/; revision=1790
parent 300994b5
2008-04-10 Tristan Van Berkom <tvb@gnome.org>
* src/glade-window.c: Added padding on top of undocked tools, removed
custom label handling of widget name.
* gladeui/glade-editor-property.c: Adapted and applied Thomas Rydzynski's patch
so that text wraps in property editor (bug 351902)
* gladeui/glade-editor.c: Trash the class entry and put a class header
on the whole editor widget, fixed a bug on my signal disconnections.
2008-04-10 Tristan Van Berkom <tvb@gnome.org>
* gladeui/glade-editor.c, gladeui/glade-editor.h:
......
......@@ -522,14 +522,6 @@ glade_app_class_init (GladeAppClass * klass)
/*****************************************************************
* Public API *
*****************************************************************/
static void
on_widget_name_changed_cb (GladeProject *project,
GladeWidget *widget,
GladeEditor *editor)
{
glade_editor_update_widget_name (editor);
}
static void
on_project_selection_changed_cb (GladeProject *project, GladeApp *app)
{
......@@ -966,8 +958,6 @@ glade_app_add_project (GladeProject *project)
app->priv->projects = g_list_append (app->priv->projects, project);
/* connect to the project signals so that the editor can be updated */
g_signal_connect (G_OBJECT (project), "widget_name_changed",
G_CALLBACK (on_widget_name_changed_cb), app->priv->editor);
g_signal_connect (G_OBJECT (project), "selection_changed",
G_CALLBACK (on_project_selection_changed_cb), app);
......
......@@ -272,23 +272,15 @@ glade_editor_property_create_info_button (GladeEditorProperty *eprop)
return button;
}
static GtkWidget *
glade_editor_property_create_warning_icon (GladeEditorProperty *eprop)
{
GtkWidget *widget = gtk_image_new_from_stock (GTK_STOCK_DIALOG_WARNING,
GTK_ICON_SIZE_MENU);
gtk_widget_set_no_show_all (widget, TRUE);
return widget;
}
static GObject *
glade_editor_property_constructor (GType type,
guint n_construct_properties,
GObjectConstructParam *construct_properties)
{
GtkRequisition req = { -1, -1 };
GObject *obj;
GladeEditorProperty *eprop;
GtkWidget *hbox;
/* Invoke parent constructor (eprop->klass should be resolved by this point) . */
obj = G_OBJECT_CLASS (table_class)->constructor
......@@ -316,15 +308,31 @@ glade_editor_property_constructor (GType type,
g_signal_connect (G_OBJECT (eprop->info), "clicked",
G_CALLBACK (glade_editor_property_info_clicked_cb), eprop);
/* Create the warning icon and add it */
eprop->warning = glade_editor_property_create_warning_icon (eprop);
/* Create the warning icon */
eprop->warning = gtk_image_new_from_stock (GTK_STOCK_DIALOG_WARNING,
GTK_ICON_SIZE_MENU);
gtk_widget_set_no_show_all (eprop->warning, TRUE);
/* Create label */
eprop->item_label = gtk_hbox_new (FALSE, 4);
/* Create & setup label */
eprop->item_label = gtk_alignment_new (1.0, 0.5, 0.0, 0.0);
hbox = gtk_hbox_new (FALSE, 4);
eprop->label = gtk_label_new (NULL);
gtk_misc_set_alignment (GTK_MISC (eprop->label), 1.0, 0.5);
gtk_box_pack_start (GTK_BOX (eprop->item_label), eprop->label, TRUE, TRUE, 0);
gtk_box_pack_start (GTK_BOX (eprop->item_label), eprop->warning, FALSE, TRUE, 0);
gtk_label_set_line_wrap (GTK_LABEL(eprop->label), TRUE);
gtk_label_set_line_wrap_mode (GTK_LABEL(eprop->label), PANGO_WRAP_WORD_CHAR);
/* gtk_label_set_width_chars() was not working well :( */
gtk_label_set_text (GTK_LABEL (eprop->label), "xxxxxxxxxxxxxxx");
gtk_widget_size_request (eprop->label, &req);
gtk_widget_set_size_request(GTK_WIDGET(eprop->label), req.width, -1);
gtk_label_set_justify (GTK_LABEL(eprop->label), GTK_JUSTIFY_RIGHT);
gtk_misc_set_alignment (GTK_MISC(eprop->label), 1.0, 0.5);
gtk_box_pack_start (GTK_BOX (hbox), eprop->warning, FALSE, TRUE, 0);
gtk_box_pack_start (GTK_BOX (hbox), eprop->label, TRUE, TRUE, 0);
gtk_container_add (GTK_CONTAINER (eprop->item_label), hbox);
glade_editor_property_fix_label (eprop);
......
......@@ -36,6 +36,8 @@
#include <string.h>
#include <glib/gi18n-lib.h>
#include <gtk/gtk.h>
#include "glade.h"
#include "glade-widget.h"
#include "glade-widget-adaptor.h"
......@@ -307,6 +309,83 @@ glade_editor_create_reset_button (GladeEditor *editor)
return button;
}
static void
glade_editor_update_class_warning_cb (GladeWidget *widget,
GParamSpec *pspec,
GladeEditor *editor)
{
if (widget->support_warning)
gtk_widget_show (editor->warning);
else
gtk_widget_hide (editor->warning);
gtk_widget_set_tooltip_text (editor->warning, widget->support_warning);
}
static void
glade_editor_update_class_field (GladeEditor *editor)
{
if (editor->loaded_widget)
{
GladeWidget *widget = editor->loaded_widget;
gchar *text;
gtk_image_set_from_icon_name (GTK_IMAGE (editor->class_icon),
widget->adaptor->icon_name,
GTK_ICON_SIZE_BUTTON);
gtk_widget_show (editor->class_icon);
/* translators: referring to the properties of a widget named '%s [%s]' */
text = g_strdup_printf (_("%s Properties - %s [%s]"),
widget->adaptor->title,
widget->adaptor->name,
widget->name);
gtk_label_set_text (GTK_LABEL (editor->class_label), text);
g_free (text);
glade_editor_update_class_warning_cb (editor->loaded_widget, NULL, editor);
}
else
{
gtk_widget_hide (editor->warning);
gtk_label_set_text (GTK_LABEL (editor->class_label), _("Properties"));
}
}
static GtkWidget *
glade_editor_setup_class_field (GladeEditor *editor)
{
PangoAttrList *attr_list = pango_attr_list_new ();
PangoAttribute *attr_weight = pango_attr_weight_new (PANGO_WEIGHT_BOLD);
GtkWidget *hbox;
hbox = gtk_hbox_new (FALSE, 4);
editor->class_icon = gtk_image_new ();
editor->class_label = gtk_label_new (NULL);
editor->warning = gtk_image_new_from_stock (GTK_STOCK_DIALOG_WARNING,
GTK_ICON_SIZE_MENU);
gtk_widget_set_no_show_all (editor->warning, TRUE);
gtk_widget_set_no_show_all (editor->class_icon, TRUE);
pango_attr_list_insert (attr_list, attr_weight);
gtk_label_set_attributes (GTK_LABEL (editor->class_label), attr_list);
pango_attr_list_unref (attr_list);
gtk_misc_set_alignment (GTK_MISC (editor->class_label), 0.0, 0.5);
gtk_label_set_ellipsize (GTK_LABEL (editor->class_label),
PANGO_ELLIPSIZE_END);
gtk_box_pack_start (GTK_BOX (hbox), editor->class_icon, FALSE, FALSE, 0);
gtk_box_pack_start (GTK_BOX (hbox), editor->warning, FALSE, FALSE, 0);
gtk_box_pack_start (GTK_BOX (hbox), editor->class_label, TRUE, TRUE, 0);
glade_editor_update_class_field (editor);
gtk_widget_show_all (hbox);
return hbox;
}
static void
glade_editor_init (GladeEditor *editor)
{
......@@ -323,8 +402,11 @@ glade_editor_init (GladeEditor *editor)
editor->packing_etable = NULL;
editor->loading = FALSE;
editor->class_field = glade_editor_setup_class_field (editor);
gtk_container_set_border_width (GTK_CONTAINER (editor->notebook), 0);
gtk_box_pack_start (GTK_BOX (editor), editor->class_field, FALSE, FALSE, 0);
gtk_box_pack_start (GTK_BOX (editor), editor->notebook, TRUE, TRUE, 0);
hbox = gtk_hbox_new (FALSE, 6);
......@@ -462,6 +544,7 @@ static void
glade_editor_table_append_name_field (GladeEditorTable *table)
{
GtkWidget *label;
gchar *text = _("The Object's name");
/* Name */
label = gtk_label_new (_("Name:"));
......@@ -471,6 +554,9 @@ glade_editor_table_append_name_field (GladeEditorTable *table)
table->name_entry = gtk_entry_new ();
gtk_widget_show (table->name_entry);
gtk_widget_set_tooltip_text (label, text);
gtk_widget_set_tooltip_text (table->name_entry, text);
g_signal_connect (G_OBJECT (table->name_entry), "activate",
G_CALLBACK (glade_editor_widget_name_changed),
table->editor);
......@@ -485,42 +571,6 @@ glade_editor_table_append_name_field (GladeEditorTable *table)
table->rows++;
}
static void
glade_editor_table_append_class_field (GladeEditorTable *table)
{
GtkWidget *label, *class_label, *icon;
GtkWidget *hbox_class_value, *hbox_class_name;
hbox_class_name = gtk_hbox_new (FALSE, 4);
label = gtk_label_new (_("Class:"));
gtk_misc_set_alignment (GTK_MISC (label), 1.0, 0.5);
gtk_box_pack_start (GTK_BOX (hbox_class_name), label, TRUE, TRUE, 0);
table->warning = gtk_image_new_from_stock (GTK_STOCK_DIALOG_WARNING,
GTK_ICON_SIZE_MENU);
gtk_widget_set_no_show_all (table->warning, TRUE);
gtk_box_pack_start (GTK_BOX (hbox_class_name), table->warning, FALSE, TRUE, 0);
gtk_widget_show_all (hbox_class_name);
hbox_class_value = gtk_hbox_new (FALSE, 2);
icon = gtk_image_new_from_icon_name
(table->adaptor->icon_name, GTK_ICON_SIZE_MENU);
gtk_box_pack_start (GTK_BOX (hbox_class_value), icon, FALSE, TRUE, 4);
class_label = gtk_label_new (table->adaptor->name);
gtk_misc_set_alignment (GTK_MISC (class_label), 0.0, 0.5);
gtk_box_pack_start (GTK_BOX (hbox_class_value), class_label, TRUE, TRUE, 0);
gtk_widget_show_all (hbox_class_value);
/* FIXME: find a better way to pack this. */
gtk_widget_set_size_request (hbox_class_value, -1, 25);
glade_editor_table_attach (table->table_widget, hbox_class_name, 0, table->rows);
glade_editor_table_attach (table->table_widget, hbox_class_value, 1, table->rows);
table->rows++;
}
static gint
glade_editor_property_class_comp (gconstpointer a, gconstpointer b)
{
......@@ -639,10 +689,7 @@ glade_editor_table_create (GladeEditor *editor,
table->type = type;
if (type == TABLE_TYPE_GENERAL)
{
glade_editor_table_append_class_field (table);
glade_editor_table_append_name_field (table);
}
if (!glade_editor_table_append_items (table, adaptor, type))
return NULL;
......@@ -748,31 +795,6 @@ glade_editor_load_page (GladeEditor *editor,
}
}
/**
* glade_editor_update_widget_name:
* @editor: a #GladeEditor
*
* TODO: write me
*/
void
glade_editor_update_widget_name (GladeEditor *editor)
{
GladeEditorTable *table;
/* it can happen that a widget name is changing that is only
* available in a custom editor so we have no table
*/
if (!editor->loaded_adaptor)
return;
table = glade_editor_get_table_from_class
(editor, editor->loaded_adaptor, TABLE_TYPE_GENERAL);
g_signal_handlers_block_by_func (G_OBJECT (table->name_entry), glade_editor_widget_name_changed, editor);
gtk_entry_set_text (GTK_ENTRY (table->name_entry), editor->loaded_widget->name);
g_signal_handlers_unblock_by_func (G_OBJECT (table->name_entry), glade_editor_widget_name_changed, editor);
}
static void
glade_editor_load_signal_page (GladeEditor *editor)
{
......@@ -892,24 +914,25 @@ glade_editor_load_table (GladeEditor *editor,
}
static void
glade_editor_update_class_warning_cb (GladeWidget *widget,
GParamSpec *pspec,
GladeEditor *editor)
glade_editor_update_widget_name_cb (GladeWidget *widget,
GParamSpec *pspec,
GladeEditor *editor)
{
GladeEditorTable *table;
if (!(table = glade_editor_get_table_from_class
(editor, editor->loaded_adaptor, TABLE_TYPE_GENERAL)))
return;
glade_editor_update_class_field (editor);
if (widget->support_warning)
gtk_widget_show (table->warning);
else
gtk_widget_hide (table->warning);
g_assert (editor->loaded_widget);
gtk_widget_set_tooltip_text (table->warning, widget->support_warning);
}
table = glade_editor_get_table_from_class
(editor, editor->loaded_adaptor, TABLE_TYPE_GENERAL);
g_signal_handlers_block_by_func (G_OBJECT (table->name_entry),
glade_editor_widget_name_changed, editor);
gtk_entry_set_text (GTK_ENTRY (table->name_entry), editor->loaded_widget->name);
g_signal_handlers_unblock_by_func (G_OBJECT (table->name_entry),
glade_editor_widget_name_changed, editor);
}
static void
glade_editor_load_widget_real (GladeEditor *editor, GladeWidget *widget)
......@@ -926,6 +949,8 @@ glade_editor_load_widget_real (GladeEditor *editor, GladeWidget *widget)
editor->project_closed_signal_id);
g_signal_handler_disconnect (G_OBJECT (editor->loaded_widget),
editor->widget_warning_id);
g_signal_handler_disconnect (G_OBJECT (editor->loaded_widget),
editor->widget_name_id);
}
/* Load the GladeWidgetClass */
......@@ -961,8 +986,8 @@ glade_editor_load_widget_real (GladeEditor *editor, GladeWidget *widget)
editor->loaded_widget = widget;
editor->loading = FALSE;
/* Update warning once */
glade_editor_update_class_warning_cb (widget, NULL, editor);
/* Update class header */
glade_editor_update_class_field (editor);
/* Connect to new widget */
project = glade_widget_get_project (editor->loaded_widget);
......@@ -973,6 +998,10 @@ glade_editor_load_widget_real (GladeEditor *editor, GladeWidget *widget)
g_signal_connect (G_OBJECT (widget), "notify::support-warning",
G_CALLBACK (glade_editor_update_class_warning_cb),
editor);
editor->widget_name_id =
g_signal_connect (G_OBJECT (widget), "notify::name",
G_CALLBACK (glade_editor_update_widget_name_cb),
editor);
}
/**
......
......@@ -100,17 +100,38 @@ struct _GladeEditor
* was loaded.
*/
gulong project_closed_signal_id; /* Unload widget when widget's project closes.
*/
gulong widget_warning_id; /* Update when widget changes warning messages.
*/
gulong widget_name_id; /* Watch the actual widget name
*/
GtkWidget *reset_button; /* The reset button
*/
GtkWidget *info_button; /* The actual informational button
*/
GtkWidget *class_field; /* The class header
*/
GtkWidget *warning; /* A pointer to an icon we can show in the class
* field to publish tooltips for class related
* versioning errors.
*/
GtkWidget *class_icon; /* An image with the current widget's class icon.
*/
GtkWidget *class_label; /* A label with the current class label.
*/
GtkWidget *widget_label; /* A label with the current widget name.
*/
gboolean show_info; /* Whether or not to show an informational button
*/
gboolean show_context_info; /* Whether or not to show an informational
......@@ -158,11 +179,6 @@ struct _GladeEditorTable
* we load into the inputs inside this table
* the information about the selected widget.
*/
GtkWidget *warning; /* A pointer to an icon we can show in the class
* property to publish tooltips for class related
* versioning errors.
*/
GtkWidget *name_entry; /* A pointer to the gtk_entry that holds
* the name of the widget. This is the
......@@ -194,8 +210,6 @@ void glade_editor_load_widget (GladeEditor *editor,
void glade_editor_refresh (GladeEditor *editor);
void glade_editor_update_widget_name (GladeEditor *editor);
gboolean glade_editor_query_dialog (GladeEditor *editor,
GladeWidget *widget);
......
......@@ -628,21 +628,24 @@ add_columns (GtkTreeView *view)
GtkCellRenderer *renderer;
column = gtk_tree_view_column_new ();
/* Class icon */
renderer = gtk_cell_renderer_pixbuf_new ();
gtk_tree_view_column_pack_start (column, renderer, FALSE);
gtk_tree_view_column_set_cell_data_func (column, renderer,
glade_inspector_cell_function,
GINT_TO_POINTER (CELL_ICON), NULL);
/* Class name */
renderer = gtk_cell_renderer_text_new ();
g_object_set (G_OBJECT (renderer),
"xpad", 6, NULL);
gtk_tree_view_column_pack_start (column, renderer, TRUE);
gtk_tree_view_column_pack_start (column, renderer, FALSE);
gtk_tree_view_column_set_cell_data_func (column, renderer,
glade_inspector_cell_function,
GINT_TO_POINTER (CELL_NAME), NULL);
/* Misc internal/special-type */
renderer = gtk_cell_renderer_text_new ();
g_object_set (G_OBJECT (renderer),
"style", PANGO_STYLE_ITALIC,
......
......@@ -220,14 +220,16 @@ glade_property_fix_state (GladeProperty *property)
property->state = GLADE_STATE_NORMAL;
else if (property->support_warning)
{
if (glade_property_default (property))
if (property->enabled &&
glade_property_default (property))
property->state = GLADE_STATE_UNSUPPORTED;
else
property->state = GLADE_STATE_UNSUPPORTED_CHANGED;
}
else
{
if (glade_property_default (property))
if (property->enabled &&
glade_property_default (property))
property->state = GLADE_STATE_NORMAL;
else
property->state = GLADE_STATE_CHANGED;
......
......@@ -99,9 +99,7 @@ struct _GladeWindowPrivate
GtkActionGroup *static_actions; /* All the static actions */
GtkActionGroup *project_actions; /* All the project actions */
GtkActionGroup *projects_list_menu_actions; /* Projects list menu actions */
GtkLabel *label; /* the title of property editor dock */
GtkRecentManager *recent_manager;
GtkWidget *recent_menu;
......@@ -637,9 +635,7 @@ static void
project_selection_changed_cb (GladeProject *project, GladeWindow *window)
{
GladeWidget *glade_widget = NULL;
GtkLabel *label;
GList *list;
gchar *text;
gint num;
/* This is sometimes called with a NULL project (to make the label
......@@ -647,16 +643,12 @@ project_selection_changed_cb (GladeProject *project, GladeWindow *window)
*/
g_return_if_fail (GLADE_IS_WINDOW (window));
label = window->priv->label;
/* Only update the editor if the selection has changed on
* the currently active project.
*/
if (glade_app_get_editor() &&
project && (project == glade_app_get_project ()))
{
gtk_widget_set_sensitive (GTK_WIDGET (label), TRUE);
list = glade_project_selection_get (project);
num = g_list_length (list);
......@@ -664,31 +656,11 @@ project_selection_changed_cb (GladeProject *project, GladeWindow *window)
{
glade_widget = glade_widget_get_from_gobject (G_OBJECT (list->data));
/* translators: referring to the properties of a widget named '%s [%s]' */
text = g_strdup_printf (_("%s [%s] - Properties"),
glade_widget_get_name (glade_widget),
G_OBJECT_TYPE_NAME (glade_widget->object));
gtk_label_set_text (label, text);
g_free (text);
clean_actions (window);
if (glade_widget->actions)
add_actions (window, glade_widget, glade_widget->actions);
}
else
{
gtk_label_set_text (label, _("Properties"));
}
}
else if (glade_app_get_editor ())
{
gtk_widget_set_sensitive (GTK_WIDGET (label), FALSE);
gtk_label_set_text (label, _("Properties"));
}
}
static GladeDesignView *
......@@ -843,38 +815,6 @@ clipboard_notify_handler_cb (GladeClipboard *clipboard, GParamSpec *spec, GladeW
}
}
static GtkWidget*
construct_dock_item (GladeWindow *window, const gchar *title, GtkWidget *child)
{
GtkWidget *vbox;
GtkWidget *label;
GtkWidget *alignment;
vbox = gtk_vbox_new (FALSE, 0);
label = gtk_label_new (title);
gtk_misc_set_alignment (GTK_MISC (label), 0, 0.5);
gtk_misc_set_padding (GTK_MISC (label), 2, 5);
alignment = gtk_alignment_new (0, 0, 1, 1);
gtk_alignment_set_padding (GTK_ALIGNMENT (alignment), 0, 0, 0, 12);
gtk_box_pack_start (GTK_BOX (vbox), alignment, FALSE, FALSE, 0);
gtk_container_add (GTK_CONTAINER (alignment), label);
gtk_box_pack_start (GTK_BOX (vbox), child, TRUE, TRUE, 0);
gtk_widget_show (alignment);
gtk_widget_show (label);
gtk_widget_show (child);
gtk_widget_show (vbox);
/* FIXME: naughty */
g_object_set_data (G_OBJECT (vbox), "dock-label", label);
return vbox;
}
static void
on_selector_button_toggled (GtkToggleToolButton *button, GladeWindow *window)
{
......@@ -1943,7 +1883,7 @@ on_dock_resized (GtkWidget *window,
static void
toggle_dock_cb (GtkAction *action, GladeWindow *window)
{
GtkWidget *toplevel;
GtkWidget *toplevel, *alignment;
ToolDock *dock;
guint dock_type;
......@@ -1957,7 +1897,9 @@ toggle_dock_cb (GtkAction *action, GladeWindow *window)
toplevel = gtk_widget_get_toplevel (dock->widget);
g_object_ref (dock->widget);
gtk_container_remove (GTK_CONTAINER (toplevel), dock->widget);
gtk_container_remove (GTK_CONTAINER
(GTK_BIN (toplevel)->child), dock->widget);
if (dock->first_child)
gtk_paned_pack1 (GTK_PANED (dock->paned), dock->widget, FALSE, FALSE);
else
......@@ -1971,6 +1913,13 @@ toggle_dock_cb (GtkAction *action, GladeWindow *window)
} else {
toplevel = gtk_window_new (GTK_WINDOW_TOPLEVEL);
/* Add a little padding on top to match the bottom */
alignment = gtk_alignment_new (0.5, 0.5, 1.0, 1.0);
gtk_alignment_set_padding (GTK_ALIGNMENT (alignment),
4, 0, 0, 0);
gtk_container_add (GTK_CONTAINER (toplevel), alignment);
gtk_widget_show (alignment);
gtk_window_set_default_size (GTK_WINDOW (toplevel),
dock->window_pos.width,
dock->window_pos.height);
......@@ -1983,7 +1932,7 @@ toggle_dock_cb (GtkAction *action, GladeWindow *window)
gtk_window_set_title (GTK_WINDOW (toplevel), dock->title);
g_object_ref (dock->widget);
gtk_container_remove (GTK_CONTAINER (dock->paned), dock->widget);
gtk_container_add (GTK_CONTAINER (toplevel), dock->widget);
gtk_container_add (GTK_CONTAINER (alignment), dock->widget);
g_object_unref (dock->widget);
g_signal_connect (G_OBJECT (toplevel), "delete-event",
......@@ -2277,7 +2226,7 @@ static GtkActionEntry project_entries[] = {
{ "Delete", GTK_STOCK_DELETE, NULL, "Delete",
N_("Delete the selection"), G_CALLBACK (delete_cb) },
{ "Preferences", GTK_STOCK_PREFERENCES, NULL, "<control>W",
{ "Preferences", GTK_STOCK_PREFERENCES, NULL, "<control>P",
N_("Modify project preferences"), G_CALLBACK (preferences_cb) },
/* ViewMenu */
......@@ -3049,7 +2998,6 @@ glade_window_init (GladeWindow *window)
window->priv = priv = GLADE_WINDOW_GET_PRIVATE (window);
priv->label = NULL;
priv->default_path = NULL;
priv->app = glade_app_new ();
......@@ -3137,12 +3085,9 @@ glade_window_init (GladeWindow *window)
_("Inspector"), "inspector", vpaned, TRUE);
/* editor */
editor = GTK_WIDGET (glade_app_get_editor ());
dockitem = construct_dock_item (window, _("Properties"), editor);
priv->label = GTK_LABEL (g_object_get_data (G_OBJECT (dockitem), "dock-label"));
gtk_label_set_ellipsize (GTK_LABEL (priv->label), PANGO_ELLIPSIZE_END);
gtk_misc_set_alignment (GTK_MISC (priv->label), 0, 0.5);
dockitem = GTK_WIDGET (glade_app_get_editor ());
gtk_paned_pack2 (GTK_PANED (vpaned), dockitem, TRUE, FALSE);
gtk_widget_show_all (dockitem);
setup_dock (&priv->docks[DOCK_EDITOR], dockitem, 500, 700,
_("Properties"), "properties", vpaned, FALSE);
......
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