gimp r25658 - in trunk: . app/widgets
- From: mitch svn gnome org
- To: svn-commits-list gnome org
- Subject: gimp r25658 - in trunk: . app/widgets
- Date: Wed, 14 May 2008 01:00:42 +0100 (BST)
Author: mitch
Date: Wed May 14 00:00:41 2008
New Revision: 25658
URL: http://svn.gnome.org/viewvc/gimp?rev=25658&view=rev
Log:
2008-05-14 Michael Natterer <mitch gimp org>
* app/widgets/gimpsessioninfo-book.[ch]: remove widget member from
struct GimpSessionInfoBook. Return the created GimpDockbook from
restore().
* app/widgets/gimpsessioninfo-dock.c (restore): use the returned
book instead of the struct member.
Modified:
trunk/ChangeLog
trunk/app/widgets/gimpsessioninfo-book.c
trunk/app/widgets/gimpsessioninfo-book.h
trunk/app/widgets/gimpsessioninfo-dock.c
Modified: trunk/app/widgets/gimpsessioninfo-book.c
==============================================================================
--- trunk/app/widgets/gimpsessioninfo-book.c (original)
+++ trunk/app/widgets/gimpsessioninfo-book.c Wed May 14 00:00:41 2008
@@ -201,13 +201,11 @@
info = gimp_session_info_book_new ();
- info->widget = GTK_WIDGET (dockbook);
-
- if (GTK_IS_VPANED (info->widget->parent))
+ if (GTK_IS_VPANED (GTK_WIDGET (dockbook)->parent))
{
- GtkPaned *paned = GTK_PANED (info->widget->parent);
+ GtkPaned *paned = GTK_PANED (GTK_WIDGET (dockbook)->parent);
- if (info->widget == gtk_paned_get_child2 (paned))
+ if (GTK_WIDGET (dockbook) == gtk_paned_get_child2 (paned))
info->position = gtk_paned_get_position (paned);
}
@@ -232,22 +230,20 @@
return info;
}
-void
+GimpDockbook *
gimp_session_info_book_restore (GimpSessionInfoBook *info,
GimpDock *dock)
{
GtkWidget *dockbook;
GList *pages;
- g_return_if_fail (info != NULL);
- g_return_if_fail (GIMP_IS_DOCK (dock));
+ g_return_val_if_fail (info != NULL, NULL);
+ g_return_val_if_fail (GIMP_IS_DOCK (dock), NULL);
dockbook = gimp_dockbook_new (dock->dialog_factory->menu_factory);
gimp_dock_add_book (dock, GIMP_DOCKBOOK (dockbook), -1);
- info->widget = dockbook;
-
for (pages = info->dockables; pages; pages = g_list_next (pages))
{
GimpSessionInfoDockable *dockable_info = pages->data;
@@ -269,4 +265,6 @@
{
gtk_notebook_set_current_page (GTK_NOTEBOOK (dockbook), 0);
}
- }
+
+ return GIMP_DOCKBOOK (dockbook);
+}
Modified: trunk/app/widgets/gimpsessioninfo-book.h
==============================================================================
--- trunk/app/widgets/gimpsessioninfo-book.h (original)
+++ trunk/app/widgets/gimpsessioninfo-book.h Wed May 14 00:00:41 2008
@@ -25,13 +25,11 @@
struct _GimpSessionInfoBook
{
- gint position;
- gint current_page;
-
- GtkWidget *widget;
+ gint position;
+ gint current_page;
/* list of GimpSessionInfoDockable */
- GList *dockables;
+ GList *dockables;
};
@@ -48,7 +46,7 @@
GimpSessionInfoBook *
gimp_session_info_book_from_widget (GimpDockbook *dockbook);
-void gimp_session_info_book_restore (GimpSessionInfoBook *info,
+GimpDockbook * gimp_session_info_book_restore (GimpSessionInfoBook *info,
GimpDock *dock);
Modified: trunk/app/widgets/gimpsessioninfo-dock.c
==============================================================================
--- trunk/app/widgets/gimpsessioninfo-dock.c (original)
+++ trunk/app/widgets/gimpsessioninfo-dock.c Wed May 14 00:00:41 2008
@@ -188,12 +188,11 @@
gimp_session_info_aux_set_list (GTK_WIDGET (dock), info->aux_info);
for (books = info->books; books; books = g_list_next (books))
- gimp_session_info_book_restore (books->data, dock);
-
- for (books = info->books; books; books = g_list_next (books))
{
GimpSessionInfoBook *book_info = books->data;
- GtkWidget *dockbook = book_info->widget;
+ GtkWidget *dockbook;
+
+ dockbook = GTK_WIDGET (gimp_session_info_book_restore (book_info, dock));
if (GTK_IS_VPANED (dockbook->parent))
{
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]