libgnomeui r5677 - in trunk: . glade libgnomeui test-gnome
- From: kmaraas svn gnome org
- To: svn-commits-list gnome org
- Subject: libgnomeui r5677 - in trunk: . glade libgnomeui test-gnome
- Date: Fri, 26 Sep 2008 08:49:10 +0000 (UTC)
Author: kmaraas
Date: Fri Sep 26 08:49:10 2008
New Revision: 5677
URL: http://svn.gnome.org/viewvc/libgnomeui?rev=5677&view=rev
Log:
Revert accidental commit
Modified:
trunk/AUTHORS
trunk/ChangeLog
trunk/glade/glade-gnome.c
trunk/libgnomeui/gnome-app-helper.c
trunk/libgnomeui/gnome-client.c
trunk/libgnomeui/gnome-dateedit.c
trunk/libgnomeui/gnome-druid.c
trunk/libgnomeui/gnome-icon-entry.c
trunk/libgnomeui/gnome-icon-item.c
trunk/libgnomeui/gnome-icon-list.c
trunk/libgnomeui/gnome-mdi-session.c
trunk/test-gnome/testgnome.c
Modified: trunk/AUTHORS
==============================================================================
--- trunk/AUTHORS (original)
+++ trunk/AUTHORS Fri Sep 26 08:49:10 2008
@@ -1,6 +1,6 @@
Anders Carlsson <andersca codefactory se>
Miguel de Icaza <miguel ximian com>
-Federico MeÃa Quintera <federico ximian com>
+Federico Meñuintera <federico ximian com>
James M. Cape <jcape ignore-your tv>
Jonathan Blandford <jrb redhat com>
James Henstridge <james daa com au>
Modified: trunk/glade/glade-gnome.c
==============================================================================
--- trunk/glade/glade-gnome.c (original)
+++ trunk/glade/glade-gnome.c Fri Sep 26 08:49:10 2008
@@ -185,6 +185,20 @@
gtk_menu_item_remove_submenu(GTK_MENU_ITEM(child));
glade_xml_set_common_params(xml, child, cwinfo);
}
+
+#if 0
+ if (uline)
+ glade_xml_pop_uline_accel(xml);
+#endif
+#if 0
+ if (strcmp(info->classname, "GtkMenuBar") != 0 &&
+ gnome_preferences_get_menus_have_tearoff()) {
+ GtkWidget *tearoff = gtk_tearoff_menu_item_new();
+
+ gtk_menu_prepend(GTK_MENU(w), tearoff);
+ gtk_widget_show(tearoff);
+ }
+#endif
}
static void
@@ -335,6 +349,17 @@
} else {
child = glade_xml_build_widget (xml, cinfo->child);
+#if 0
+ g_object_ref (G_OBJECT (child));
+ gtk_widget_freeze_child_notify (child);
+ for (j = 0; j < info->children[i].n_properties; j++)
+ glade_xml_set_packing_property (
+ xml, GNOME_APP (parent)->vbox, child,
+ cinfo->properties[j].name,
+ cinfo->properties[j].value);
+ gtk_widget_thaw_child_notify(child);
+ g_object_unref(G_OBJECT(child));
+#endif
}
}
}
@@ -635,6 +660,10 @@
{
if (!strcmp (childname, "dock"))
return GNOME_APP (parent)->dock;
+#if 0
+ else if (!strcmp (childname, "appbar"))
+ return GNOME_APP (parent)->statusbar;
+#endif
return NULL;
}
Modified: trunk/libgnomeui/gnome-app-helper.c
==============================================================================
--- trunk/libgnomeui/gnome-app-helper.c (original)
+++ trunk/libgnomeui/gnome-app-helper.c Fri Sep 26 08:49:10 2008
@@ -766,8 +766,40 @@
gint ac_mods;
if ( type != GNOME_APP_CONFIGURABLE_ITEM_NEW ) {
+#if 0
+ gboolean label_def;
+ gchar *label_string;
+ gchar *label;
+ gboolean hint_def;
+ gchar *hint_string;
+ gchar *hint;
+
+ label_string = g_strdup_sprintf( "/Gnome/Menus/Menu-%s-label", menu_names[(int) type] );
+ label = gnome_config_get_string_with_default( label_string, &label_def);
+ if ( label_def )
+ uiinfo->label = label;
+ else
+ {
+#endif
uiinfo->label = menu_defaults[(int) type].label;
+#if 0
+ g_free( label );
+ }
+ g_free( label_string );
+
+ hint_string = g_strdup_sprintf( "/Gnome/Menus/Menu-%s-hint", menu_names[(int) type] );
+ hint = gnome_config_get_string_with_default( hint_string, &hint_def);
+ if ( hint_def )
+ uiinfo->hint = hint;
+ else
+ {
+#endif
uiinfo->hint = menu_defaults[(int) type].hint;
+#if 0
+ g_free( hint );
+ }
+ g_free( hint_string );
+#endif
}
uiinfo->pixmap_type = menu_defaults[(int) type].pixmap_type;
uiinfo->pixmap_info = menu_defaults[(int) type].pixmap_info;
Modified: trunk/libgnomeui/gnome-client.c
==============================================================================
--- trunk/libgnomeui/gnome-client.c (original)
+++ trunk/libgnomeui/gnome-client.c Fri Sep 26 08:49:10 2008
@@ -740,7 +740,6 @@
{
unlink (name);
close (fd);
- g_free (client->config_prefix);
client->config_prefix = g_strconcat (name+strlen(name) - len, "/", NULL);
if (client == master_client)
@@ -855,6 +854,20 @@
/*****************************************************************************/
/* Managing the master client */
+#if 0
+/* The following environment variables will be set on the master
+ client, if they are defined the programs environment. The array
+ must end with a NULL entry.
+ For now we have no entries. You might think that saving DISPLAY,
+ or HOME, or something like that would be right. It isn't. We
+ definitely want to inherit these values from the user's (possibly
+ changing) environment. */
+static char* master_environment[]=
+{
+ NULL
+};
+#endif
+
/********* gnome_client module */
/* Forward declaration for our module functions. */
@@ -1116,6 +1129,9 @@
static void
gnome_client_pre_args_parse(GnomeProgram *app, GnomeModuleInfo *mod_info)
{
+#if 0
+ int i;
+#endif
char *cwd;
/* Make sure the Gtk+ type system is initialized. */
@@ -1133,6 +1149,19 @@
/* Initialise ICE */
gnome_ice_init ();
+#if 0
+ /* Set the master client's environment. */
+ for (i= 0; master_environment[i]; i++)
+ {
+ const char *value= g_getenv (master_environment[i]);
+
+ if (value)
+ gnome_client_set_environment (master_client,
+ master_environment[i],
+ value);
+ }
+#endif
+
cwd = g_get_current_dir();
if (cwd != NULL)
{
Modified: trunk/libgnomeui/gnome-dateedit.c
==============================================================================
--- trunk/libgnomeui/gnome-dateedit.c (original)
+++ trunk/libgnomeui/gnome-dateedit.c Fri Sep 26 08:49:10 2008
@@ -305,7 +305,29 @@
g_date_free (date);
- /* FIXME: the preceeding needs further checking to see if it's correct */
+ /* FIXME: the preceeding needs further checking to see if it's correct,
+ * the following is so utterly wrong that it doesn't even deserve to be
+ * just commented out, but I didn't want to cut it right now */
+#if 0
+ struct tm mtm = {0};
+ /* This code is pretty much just copied from gtk_date_edit_get_date */
+ sscanf (gtk_entry_get_text (GTK_ENTRY (gde->_priv->date_entry)), "%d/%d/%d",
+ &mtm.tm_mon, &mtm.tm_mday, &mtm.tm_year);
+
+ mtm.tm_mon = CLAMP (mtm.tm_mon, 1, 12);
+ mtm.tm_mday = CLAMP (mtm.tm_mday, 1, 31);
+
+ mtm.tm_mon--;
+
+ /* Hope the user does not actually mean years early in the A.D. days...
+ * This date widget will obviously not work for a history program :-)
+ */
+ if (mtm.tm_year >= 1900)
+ mtm.tm_year -= 1900;
+
+ gtk_calendar_select_month (GTK_CALENDAR (gde->_priv->calendar), mtm.tm_mon, 1900 + mtm.tm_year);
+ gtk_calendar_select_day (GTK_CALENDAR (gde->_priv->calendar), mtm.tm_mday);
+#endif
position_popup (gde);
@@ -382,6 +404,16 @@
item = gtk_menu_item_new_with_label (str_utf8 ? str_utf8 : "");
g_free (str_utf8);
gtk_menu_shell_append (GTK_MENU_SHELL (menu), item);
+#if 0
+ hit = g_new (hour_info_t, 1);
+ hit->hour = g_strdup (buffer);
+ hit->gde = gde;
+ g_signal_connect_data (item, "activate",
+ G_CALLBACK (set_time),
+ hit,
+ (GCallbackNotify) free_resources,
+ 0);
+#endif
gtk_widget_show (item);
submenu = gtk_menu_new ();
@@ -907,7 +939,25 @@
g_date_free (date);
- /* FIXME: the preceeding needs further checking to see if it's correct */
+ /* FIXME: the preceeding needs further checking to see if it's correct,
+ * the following is so utterly wrong that it doesn't even deserve to be
+ * just commented out, but I didn't want to cut it right now */
+#if 0
+ sscanf (gtk_entry_get_text (GTK_ENTRY (gde->_priv->date_entry)), "%d/%d/%d",
+ &tm.tm_mon, &tm.tm_mday, &tm.tm_year);
+
+ tm.tm_mon = CLAMP (tm.tm_mon, 1, 12);
+ tm.tm_mday = CLAMP (tm.tm_mday, 1, 31);
+
+ tm.tm_mon--;
+
+ /* Hope the user does not actually mean years early in the A.D. days...
+ * This date widget will obviously not work for a history program :-)
+ */
+ if (tm.tm_year >= 1900)
+ tm.tm_year -= 1900;
+
+#endif
if (gde->_priv->flags & GNOME_DATE_EDIT_SHOW_TIME) {
char *tokp, *temp;
Modified: trunk/libgnomeui/gnome-druid.c
==============================================================================
--- trunk/libgnomeui/gnome-druid.c (original)
+++ trunk/libgnomeui/gnome-druid.c Fri Sep 26 08:49:10 2008
@@ -358,6 +358,46 @@
requisition->width = temp_width + 2 * border;
requisition->height = temp_height + 2 * border;
+#if 0
+ /* In an Attempt to show how the widgets are packed,
+ * here's a little diagram.
+ *
+ * [ Help ] ------------- [ Back ] [ Next ] [ Cancel ]
+ * /
+ * This part needs to be at least 1 button width.
+ * In addition, there is 1/4 X Button width between Cancel and Next,
+ * and a GNOME_PAD_SMALL between Next and Back.
+ */
+ /* our_button width is temp_width and temp_height */
+ temp_height = 0;
+ temp_width = 0;
+
+ gtk_widget_size_request (druid->back, &child_requisition);
+ temp_width = MAX (temp_width, child_requisition.width);
+ temp_height = MAX (temp_height, child_requisition.height);
+
+ gtk_widget_size_request (druid->next, &child_requisition);
+ temp_width = MAX (temp_width, child_requisition.width);
+ temp_height = MAX (temp_height, child_requisition.height);
+
+ gtk_widget_size_request (druid->cancel, &child_requisition);
+ temp_width = MAX (temp_width, child_requisition.width);
+ temp_height = MAX (temp_height, child_requisition.height);
+
+ gtk_widget_size_request (druid->finish, &child_requisition);
+ temp_width = MAX (temp_width, child_requisition.width);
+ temp_height = MAX (temp_height, child_requisition.height);
+
+ gtk_widget_size_request (druid->help, &child_requisition);
+ temp_width = MAX (temp_width, child_requisition.width);
+ temp_height = MAX (temp_height, child_requisition.height);
+
+ temp_width += border * 2;
+ temp_height += GNOME_PAD_SMALL;
+
+ temp_width = temp_width * 21/4 + GNOME_PAD_SMALL * 3;
+#endif
+
gtk_widget_size_request (druid->_priv->bbox, &child_requisition);
/* pick which is bigger, the buttons, or the GnomeDruidPages */
@@ -383,6 +423,38 @@
border = GTK_CONTAINER(widget)->border_width;
+#if 0
+ /* deal with the buttons */
+ child_allocation.width = child_allocation.height = 0;
+ child_allocation.width = druid->back->requisition.width;
+ child_allocation.height = druid->back->requisition.height;
+ child_allocation.width = MAX (child_allocation.width,
+ druid->next->requisition.width);
+ child_allocation.height = MAX (child_allocation.height,
+ druid->next->requisition.height);
+ child_allocation.width = MAX (child_allocation.width,
+ druid->cancel->requisition.width);
+ child_allocation.height = MAX (child_allocation.height,
+ druid->cancel->requisition.height);
+ child_allocation.width = MAX (child_allocation.width,
+ druid->help->requisition.width);
+ child_allocation.height = MAX (child_allocation.height,
+ druid->help->requisition.height);
+
+ child_allocation.height += GNOME_PAD_SMALL;
+ button_height = child_allocation.height;
+ child_allocation.width += 2 * GNOME_PAD_SMALL;
+ child_allocation.x = allocation->x + allocation->width - GNOME_PAD_SMALL - child_allocation.width;
+ child_allocation.y = allocation->y + allocation->height - GNOME_PAD_SMALL - child_allocation.height;
+ gtk_widget_size_allocate (druid->cancel, &child_allocation);
+ child_allocation.x -= (child_allocation.width * 5 / 4);
+ gtk_widget_size_allocate (druid->next, &child_allocation);
+ gtk_widget_size_allocate (druid->finish, &child_allocation);
+ child_allocation.x -= (GNOME_PAD_SMALL + child_allocation.width);
+ gtk_widget_size_allocate (druid->back, &child_allocation);
+ child_allocation.x = allocation->x + border;
+ gtk_widget_size_allocate (druid->help, &child_allocation);
+#endif
button_height = druid->_priv->bbox->requisition.height;
child_allocation.x = allocation->x;
child_allocation.y = allocation->y + allocation->height - button_height;
@@ -424,6 +496,16 @@
druid = GNOME_DRUID (widget);
GTK_WIDGET_SET_FLAGS (druid, GTK_MAPPED);
+#if 0
+ gtk_widget_map (druid->back);
+ if (druid->_priv->show_finish)
+ gtk_widget_map (druid->finish);
+ else
+ gtk_widget_map (druid->next);
+ if (druid->_priv->show_help)
+ gtk_widget_map (druid->help);
+ gtk_widget_map (druid->cancel);
+#endif
gtk_widget_map (druid->_priv->bbox);
if (druid->_priv->current &&
GTK_WIDGET_VISIBLE (druid->_priv->current) &&
@@ -442,6 +524,16 @@
druid = GNOME_DRUID (widget);
GTK_WIDGET_UNSET_FLAGS (druid, GTK_MAPPED);
+#if 0
+ gtk_widget_unmap (druid->back);
+ if (druid->_priv->show_finish)
+ gtk_widget_unmap (druid->finish);
+ else
+ gtk_widget_unmap (druid->next);
+ gtk_widget_unmap (druid->cancel);
+ if (druid->_priv->show_help)
+ gtk_widget_unmap (druid->help);
+#endif
gtk_widget_unmap (druid->_priv->bbox);
if (druid->_priv->current &&
GTK_WIDGET_VISIBLE (druid->_priv->current) &&
@@ -517,6 +609,13 @@
if (include_internals) {
/* FIXME: should this be gtk_contianer_forall() ? */
(* callback) (druid->_priv->bbox, callback_data);
+#if 0
+ (* callback) (druid->back, callback_data);
+ (* callback) (druid->next, callback_data);
+ (* callback) (druid->cancel, callback_data);
+ (* callback) (druid->finish, callback_data);
+ (* callback) (druid->help, callback_data);
+#endif
}
}
@@ -545,6 +644,18 @@
}
gtk_container_propagate_expose (GTK_CONTAINER (widget),
druid->_priv->bbox, event);
+#if 0
+ gtk_container_propagate_expose (GTK_CONTAINER (widget),
+ druid->back, event);
+ gtk_container_propagate_expose (GTK_CONTAINER (widget),
+ druid->next, event);
+ gtk_container_propagate_expose (GTK_CONTAINER (widget),
+ druid->cancel, event);
+ gtk_container_propagate_expose (GTK_CONTAINER (widget),
+ druid->finish, event);
+ gtk_container_propagate_expose (GTK_CONTAINER (widget),
+ druid->help, event);
+#endif
}
return FALSE;
}
Modified: trunk/libgnomeui/gnome-icon-entry.c
==============================================================================
--- trunk/libgnomeui/gnome-icon-entry.c (original)
+++ trunk/libgnomeui/gnome-icon-entry.c Fri Sep 26 08:49:10 2008
@@ -351,6 +351,12 @@
}
}
g_object_unref (scaled);
+#if 0
+ gtk_drag_source_set (ientry->_priv->pickbutton,
+ GDK_BUTTON1_MASK|GDK_BUTTON3_MASK,
+ drop_types, G_N_ELEMENTS (drop_types),
+ GDK_ACTION_COPY);
+#endif
}
static void
@@ -391,6 +397,65 @@
}
}
+#if 0
+static void
+setup_preview(GtkWidget *widget)
+{
+ char *p;
+ GList *l;
+ GtkWidget *pp = NULL;
+ GdkPixbuf *pixbuf, *scaled;
+ int w,h;
+ GtkWidget *frame;
+ GtkFileChooser *fc;
+
+ g_return_if_fail (widget != NULL);
+ g_return_if_fail (GTK_IS_WIDGET (widget));
+
+ fc = GTK_FILE_CHOOSER (widget);
+ frame = gtk_file_chooser_get_preview_widget (fc);
+
+ if((l = gtk_container_get_children(GTK_CONTAINER(frame))) != NULL) {
+ pp = l->data;
+ g_list_free(l);
+ }
+
+ if(pp)
+ gtk_widget_destroy(pp);
+
+ p = gtk_file_chooser_get_filename(fc);
+ if(!p || !g_file_test (p,G_FILE_TEST_IS_SYMLINK | G_FILE_TEST_IS_REGULAR) ||
+ !(pixbuf = gdk_pixbuf_new_from_file (p, NULL))) {
+ g_free (p);
+ return;
+ }
+
+ g_free (p);
+
+ w = gdk_pixbuf_get_width(pixbuf);
+ h = gdk_pixbuf_get_height(pixbuf);
+ if(w>h) {
+ if(w>100) {
+ h = h*(100.0/w);
+ w = 100;
+ }
+ } else {
+ if(h>100) {
+ w = w*(100.0/h);
+ h = 100;
+ }
+ }
+
+ scaled = gdk_pixbuf_scale_simple (pixbuf, w, h, GDK_INTERP_BILINEAR);
+ g_object_unref (pixbuf);
+ pp = gtk_image_new_from_pixbuf (scaled);
+ g_object_unref (scaled);
+
+ gtk_widget_show(pp);
+ gtk_container_add(GTK_CONTAINER(frame),pp);
+}
+#endif
+
static void
ientry_destroy (GtkObject *object)
{
@@ -453,6 +518,11 @@
browse_clicked(GnomeFileEntry *fentry, GnomeIconEntry *ientry)
{
GtkFileChooser *fc;
+#if 0
+ GtkWidget *w;
+ GClosure *closure;
+ gchar *path;
+#endif
g_return_if_fail (fentry != NULL);
g_return_if_fail (GNOME_IS_FILE_ENTRY (fentry));
@@ -465,6 +535,25 @@
fc = GTK_FILE_CHOOSER (fentry->fsw);
g_return_if_fail (gtk_file_chooser_get_preview_widget (fc) == NULL);
+
+#if 0
+ w = gtk_frame_new("");
+ gtk_frame_set_shadow_type (GTK_FRAME (w), GTK_SHADOW_NONE);
+
+ gtk_file_chooser_set_preview_widget (fc, w);
+ gtk_widget_set_size_request (w, 110, 110);
+
+ closure = g_cclosure_new (G_CALLBACK (setup_preview), NULL, NULL);
+ g_object_watch_closure (G_OBJECT (fc), closure);
+ g_signal_connect_closure (fc, "update-preview",
+ closure, FALSE);
+
+ /* the path can be already set */
+ if ((path = gtk_file_chooser_get_filename (fc)) != NULL)
+ setup_preview (GTK_WIDGET(fc));
+
+ g_free (path);
+#endif
}
static void
Modified: trunk/libgnomeui/gnome-icon-item.c
==============================================================================
--- trunk/libgnomeui/gnome-icon-item.c (original)
+++ trunk/libgnomeui/gnome-icon-item.c Fri Sep 26 08:49:10 2008
@@ -593,6 +593,12 @@
iti->selected ? GTK_STATE_SELECTED: GTK_STATE_NORMAL,
&r, widget, NULL,
xofs, yofs, w - 1, h - 1);
+#if 0
+ gtk_draw_focus (style,
+ drawable,
+ xofs, yofs,
+ w - 1, h - 1);
+#endif
}
if (iti->editing) {
Modified: trunk/libgnomeui/gnome-icon-list.c
==============================================================================
--- trunk/libgnomeui/gnome-icon-list.c (original)
+++ trunk/libgnomeui/gnome-icon-list.c Fri Sep 26 08:49:10 2008
@@ -823,6 +823,13 @@
emit_select (gil, TRUE, idx, event);
do_select = FALSE;
}
+#if 0
+ } else if (icon->selected && on_text && priv->is_editable
+ && event->button.button == 1) {
+ priv->edit_pending = TRUE;
+ do_select = FALSE;
+ }
+#endif
if (do_select)
do_select_many (gil, icon, idx, event, TRUE);
@@ -910,6 +917,76 @@
}
}
+#if 0
+/* Handler for the editing_started signal of an icon text item. We block the
+ * event handler so that it will not be called while the text is being edited.
+ */
+static void G_GNUC_UNUSED
+editing_started (GnomeIconTextItem *iti, gpointer data)
+{
+ Icon *icon;
+
+ icon = data;
+ g_signal_handler_block (iti, icon->text_event_id);
+ gil_unselect_all (GIL (GNOME_CANVAS_ITEM (iti)->canvas), NULL, icon);
+}
+
+/* Handler for the editing_stopped signal of an icon text item. We unblock the
+ * event handler so that we can get events from it again.
+ */
+static void G_GNUC_UNUSED
+editing_stopped (GnomeIconTextItem *iti, gpointer data)
+{
+ Icon *icon;
+
+ icon = data;
+ g_signal_handler_unblock (iti, icon->text_event_id);
+}
+
+static gboolean G_GNUC_UNUSED
+text_changed (GnomeCanvasItem *item, Icon *icon)
+{
+ Gil *gil;
+ gboolean accept;
+ gchar *text = NULL;
+ int idx;
+
+ gil = GIL (item->canvas);
+ accept = TRUE;
+
+ idx = gil_icon_to_index (gil, icon);
+ g_object_get (G_OBJECT (icon->text), "text", &text, NULL);
+ g_signal_emit (gil, gil_signals[TEXT_CHANGED], 0,
+ idx, text,
+ &accept);
+
+ return accept;
+}
+
+static void G_GNUC_UNUSED
+height_changed (GnomeCanvasItem *item, Icon *icon)
+{
+ Gil *gil;
+ GnomeIconListPrivate *priv;
+ int n;
+
+ gil = GIL (item->canvas);
+ priv = gil->_priv;
+
+ if (!GTK_WIDGET_REALIZED (gil))
+ return;
+
+ if (priv->frozen) {
+ priv->dirty = TRUE;
+ return;
+ }
+
+ n = gil_icon_to_index (gil, icon);
+ gil_layout_from_line (gil, n / gil_get_items_per_line (gil));
+ gil_scrollbar_adjust (gil);
+}
+#endif
+
static Icon *
icon_new_from_pixbuf (GnomeIconList *gil, GdkPixbuf *im,
const char *icon_filename, const char *text)
@@ -957,6 +1034,23 @@
icon->text_event_id = g_signal_connect (G_OBJECT (icon->text), "event",
G_CALLBACK (icon_event),
icon);
+
+#if 0
+ g_signal_connect (G_OBJECT (icon->text), "editing_started",
+ G_CALLBACK (editing_started),
+ icon);
+ g_signal_connect (G_OBJECT (icon->text), "editing_stopped",
+ G_CALLBACK (editing_stopped),
+ icon);
+
+ g_signal_connect (G_OBJECT (icon->text), "text_changed",
+ G_CALLBACK (text_changed),
+ icon);
+ g_signal_connect (G_OBJECT (icon->text), "height_changed",
+ G_CALLBACK (height_changed),
+ icon);
+#endif
+
return icon;
}
Modified: trunk/libgnomeui/gnome-mdi-session.c
==============================================================================
--- trunk/libgnomeui/gnome-mdi-session.c (original)
+++ trunk/libgnomeui/gnome-mdi-session.c Fri Sep 26 08:49:10 2008
@@ -179,6 +179,23 @@
g_snprintf (key, sizeof(key), "%s/mdi_window_layout_%lx", section, window);
string = gnome_config_get_string (key);
if (!string) return;
+
+#if 0
+ {
+ GnomeApp *app = mdi->active_window;
+ BonoboDockLayout *layout;
+
+ printf("app->layout == %08lx\n", app->layout);
+
+ /* this should be a nasty hack before dock-layout gets a bit better
+ don't even know if it works, though ;) */
+ layout = bonobo_dock_get_layout(BONOBO_DOCK(app->dock));
+ bonobo_dock_layout_parse_string(mdi->active_window->layout, string);
+ gtk_container_forall(GTK_CONTAINER(app->dock), remove_items, app->dock);
+ bonobo_dock_add_from_layout(BONOBO_DOCK(app->dock), layout);
+ g_object_unref (G_OBJECT(layout));
+ }
+#endif
}
static void
Modified: trunk/test-gnome/testgnome.c
==============================================================================
--- trunk/test-gnome/testgnome.c (original)
+++ trunk/test-gnome/testgnome.c Fri Sep 26 08:49:10 2008
@@ -1,7 +1,7 @@
/* testGNOME - program similar to testgtk which shows gnome lib functions.
*
* Authors : Richard Hestilow <hestgray ionet net> (GNOME 1.x version)
- * Carlos Perellà MarÃn <carlos gnome-db org> (Ported to GNOME 2.0)
+ * Carlos PerellïMarï <carlos gnome-db org> (Ported to GNOME 2.0)
*
* Copyright (C) 1998-2001 Free Software Foundation
*
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]