Mailinglist Archive: opensuse-commit (1942 mails)

< Previous Next >
commit gtk2
  • From: root@xxxxxxxxxxxxxxx (h_root)
  • Date: Fri, 07 Nov 2008 15:59:48 +0100
  • Message-id: <20081107145948.C1BE0678174@xxxxxxxxxxxxxxx>

Hello community,

here is the log from the commit of package gtk2
checked in at Fri Nov 7 15:59:48 CET 2008.


--------
--- GNOME/gtk2/gtk2.changes 2008-11-03 01:39:21.000000000 +0100
+++ /mounts/work_src_done/STABLE/gtk2/gtk2.changes 2008-11-06
17:15:41.000000000 +0100
@@ -1,0 +2,8 @@
+Thu Nov 6 10:07:11 CST 2008 - federico@xxxxxxxxxx
+
+- Added gtk2-bnc355503-file-chooser-remember-geometry.diff to fix
+ https://bugzilla.novell.com/show_bug.cgi?id=355503 - The file
+ chooser now remembers its window size across invocations, so it does
+ not have to be resized every time.
+
+-------------------------------------------------------------------

calling whatdependson for head-i586


New:
----
gtk2-bnc355503-file-chooser-remember-geometry.diff

++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++

Other differences:
------------------
++++++ gtk2.spec ++++++
--- /var/tmp/diff_new_pack.L16134/_old 2008-11-07 15:59:21.000000000 +0100
+++ /var/tmp/diff_new_pack.L16134/_new 2008-11-07 15:59:21.000000000 +0100
@@ -44,7 +44,7 @@
AutoReqProv: on
PreReq: /usr/bin/touch /bin/rm /bin/rmdir
Version: 2.14.4
-Release: 2
+Release: 3
Summary: Library for Creation of Graphical User Interfaces (version 2)
Source:
ftp://ftp.gnome.org/pub/GNOME/sources/%{_name}/2.12/%{_name}-%{version}.tar.bz2
Source1: SuSEconfig.gtk2
@@ -84,6 +84,8 @@
Patch53: gtk-path-local.patch
# PATCH-FIX-UPSTREAM
gtk2-bnc310710-bgo524166-underallocated-gtklabel-position.diff bnc310710
bgo524166 federico@xxxxxxxxxx - Fix positioning of GtkLabels with too-small
allocations
Patch54: gtk2-bnc310710-bgo524166-underallocated-gtklabel-position.diff
+# PATCH-FEATURE-OPENSUSE gtk2-bnc355503-file-chooser-remember-geometry.diff
bnc355503 federico@xxxxxxxxxx - Make the file chooser remember its size across
invocations
+Patch55: gtk2-bnc355503-file-chooser-remember-geometry.diff
BuildRoot: %{_tmppath}/%{name}-%{version}-build
Requires: cairo >= 0.9.2 hicolor-icon-theme
%if %suse_version > 1020
@@ -302,6 +304,7 @@
# %patch51 -p1
%patch53
%patch54 -p1
+%patch55 -p1
# gnome-patch-translation-update

%build
@@ -436,7 +439,12 @@
%{_datadir}/gtk-doc/html/*

%changelog
-* Mon Nov 03 2008 vuntz@xxxxxxxxxx
+* Thu Nov 06 2008 federico@xxxxxxxxxx
+- Added gtk2-bnc355503-file-chooser-remember-geometry.diff to fix
+ https://bugzilla.novell.com/show_bug.cgi?id=355503 - The file
+ chooser now remembers its window size across invocations, so it does
+ not have to be resized every time.
+* Sun Nov 02 2008 vuntz@xxxxxxxxxx
- Remove gtk-warn.patch: already fixed upstream.
* Tue Oct 21 2008 maw@xxxxxxx
- Update to version 2.14.4:
@@ -464,7 +472,7 @@
- add gcc-c++ to buildrequires to work around libtool problem
* Sun Sep 28 2008 ro@xxxxxxx
- add gcc-c++ to buildrequires to work around libtool problem
-* Tue Sep 09 2008 maw@xxxxxxx
+* Mon Sep 08 2008 maw@xxxxxxx
- Update to version 2.14.1:
+ Fix a deadlock in pixbuf loader initialization
+ Updated translations.
@@ -511,7 +519,7 @@
bgo#540834, bgo#515596, bgo#534979, bgo#382291, bgo#545982,
and bgo#544858
+ Updated translations.
-* Fri Aug 01 2008 maw@xxxxxxx
+* Thu Jul 31 2008 maw@xxxxxxx
- Update to version 2.13.5:
+ Merge the GSEAL branch (see http://live.gnome.org/GTK+/3.0/Tasks);
as a result, members of structures can be conditionally be
@@ -545,7 +553,7 @@
+ Updated translations
- Respin gtk+-strict-aliasing.patch
- Drop gtk2-remove-empty-cache.patch and update SuSEconfig.gtk2.
-* Wed Jul 23 2008 coolo@xxxxxxx
+* Tue Jul 22 2008 coolo@xxxxxxx
- obsolete gail-<targettype>
* Mon Jul 21 2008 federico@xxxxxxxxxx
- Tagged all the patches that didn't have tags.
@@ -622,7 +630,7 @@
completion.
* Tue May 06 2008 schwab@xxxxxxx
- Don't use libtool before it is created.
-* Tue May 06 2008 federico@xxxxxxxxxx
+* Mon May 05 2008 federico@xxxxxxxxxx
- Added gtk2-bnc310710-bgo524166-underallocated-gtklabel-position.diff
to fix https://bugzilla.novell.com/show_bug.cgi?id=310710 - Labels
with too-small allocations should still pay attention to their
@@ -834,7 +842,7 @@
- adding hicolor-icon-theme to Requires [#249043]
* Thu Apr 19 2007 sbrabec@xxxxxxx
- Correctly initialize XDG_DATA_DIRS in SuSEconfig (#240603).
-* Thu Apr 12 2007 maw@xxxxxxx
+* Wed Apr 11 2007 maw@xxxxxxx
- Remove some extraneous comments that were inadvertently left
in the .spec.
* Tue Apr 10 2007 sbrabec@xxxxxxx
@@ -863,7 +871,7 @@
https://bugzilla.novell.com/show_bug.cgi?id=216883. The "Home" and
"Desktop" items in the shortcuts pane of the file chooser would not
show sometimes in SAVE mode.
-* Thu Jan 18 2007 maw@xxxxxxx
+* Wed Jan 17 2007 maw@xxxxxxx
- Add gtk2-235661-pixbuf-loader-error-checking.diff (#235661).
* Tue Jan 16 2007 sbrabec@xxxxxxx
- Build with correct CFLAGS.
@@ -876,9 +884,9 @@
* Mon Dec 11 2006 sbrabec@xxxxxxx
- Prefix changed to /usr.
- Spec file cleanup.
-* Sat Nov 11 2006 danw@xxxxxxx
+* Fri Nov 10 2006 danw@xxxxxxx
- Update gtk64.patch to fix stock icon cache on x86_64 (213922)
-* Wed Nov 08 2006 jhargadon@xxxxxxx
+* Tue Nov 07 2006 jhargadon@xxxxxxx
- removed the execute bit from /etc/opt/gnome/gtk-2.0/gtkrc
* Tue Oct 17 2006 jhargadon@xxxxxxx
- update to version 2.10.6
@@ -944,13 +952,13 @@
- lots of updates in the printing area
- various fixes in many other places
- countless bugfixes
-* Wed Jun 21 2006 federico@xxxxxxxxxx
+* Tue Jun 20 2006 federico@xxxxxxxxxx
- Added gtk2-184875-filechooser-location-entry-set-path.diff to fix
https://bugzilla.novell.com/show_bug.cgi?id=184875. This makes the
location entry in the file chooser preserve the filename from
gtk_file_chooser_set_filename() and set_uri(). It was incorrectly
using just the directory name instead of the file name.
-* Wed Jun 07 2006 federico@xxxxxxxxxx
+* Tue Jun 06 2006 federico@xxxxxxxxxx
- Added gtk2-179040-file-chooser-location-entry-folder.diff to fix
https://bugzilla.novell.com/show_bug.cgi?id=179040. This makes the
location entry in GtkFileChooser update correctly when you switch
@@ -961,11 +969,11 @@
months or years.
* Thu Jun 01 2006 sbrabec@xxxxxxx
- Fixed I18N of file selector navigation buttons (#180696).
-* Sun May 28 2006 joeshaw@xxxxxxx
+* Sat May 27 2006 joeshaw@xxxxxxx
- Add gtk2-filechooserbutton-signal-disconnect-fix.patch to fix
a crash when a GtkFileChooserButton is destroyed but not
finalized and bookmarks or volumes change. (bnc #178122)
-* Wed May 24 2006 federico@xxxxxxxxxx
+* Tue May 23 2006 federico@xxxxxxxxxx
- Updated gtk+-2.8.6-fontsel-fix.patch to fix bug
https://bugzilla.novell.com/show_bug.cgi?id=177997. The previous
patch caused crashes in all font selectors.
@@ -983,7 +991,7 @@
just switched folders.
* Mon Apr 03 2006 sbrabec@xxxxxxx
- Fixed context translation bugs (GNOME#336645).
-* Thu Mar 30 2006 federico@xxxxxxxxxx
+* Wed Mar 29 2006 federico@xxxxxxxxxx
- Removed gtk2-151580-filechooser-beagle.diff.
- Added gtk2-filechooser-new-features.diff. This fixes bug #160605,
so the file chooser now has an optional text entry for the file
@@ -991,13 +999,13 @@
into the same patch.
* Fri Mar 24 2006 rml@xxxxxxx
- Set default invisible char to something stetic (bug #160688)
-* Fri Mar 24 2006 federico@xxxxxxxxxx
+* Thu Mar 23 2006 federico@xxxxxxxxxx
- Updated gtk2-151580-filechooser-beagle.diff to fix bug #156843.
With this, the file chooser will no longer show a "Search" item in
the "Save in folder" combo box.
* Mon Mar 13 2006 sbrabec@xxxxxxx
- Do not believe glibc first weekday (#130787, #104417).
-* Tue Mar 07 2006 zsu@xxxxxxx
+* Mon Mar 06 2006 zsu@xxxxxxx
- Fixed gtkvts crash bug introduced by gtk+-2.8.6-fontsel.patch [#153099].
* Thu Feb 23 2006 federico@xxxxxxxxxx
- Updated gtk2-151580-filechooser-beagle.diff; now we hide the search
@@ -1020,7 +1028,7 @@
to translation compendium gnome-patch-translation.
* Wed Jan 25 2006 mls@xxxxxxx
- converted neededforbuild to BuildRequires
-* Wed Jan 18 2006 gekker@xxxxxxx
+* Tue Jan 17 2006 gekker@xxxxxxx
- Add patch to improve scrolling speed in font selection (#130159)
* Mon Jan 16 2006 meissner@xxxxxxx
- use -fstack-protector.
@@ -1059,7 +1067,7 @@
* Tue Oct 11 2005 gekker@xxxxxxx
- Update to version 2.8.6
- Fix return of random data
-* Wed Oct 05 2005 federico@xxxxxxxxxx
+* Tue Oct 04 2005 federico@xxxxxxxxxx
- Added gtk2-file-chooser-consistent-home-folder-name.diff so that
$HOME will not appear as "Home", but rather as its actual name.
This avoids having [/][home][Home] on the path bar.
@@ -1068,7 +1076,7 @@
* Mon Oct 03 2005 gekker@xxxxxxx
- Update to version 2.8.4
- Remove upstream patches
-* Fri Sep 30 2005 federico@xxxxxxxxxx
+* Thu Sep 29 2005 federico@xxxxxxxxxx
- Added gtk2-file-chooser-create-save-widgets-only-if-needed.diff and
gtk2-file-chooser-no-reload.diff as optimizations for the file
chooser's startup time.
@@ -1089,11 +1097,11 @@
* Wed Aug 24 2005 rodrigo@xxxxxxx
- Update to version 2.8.1
- Updated gtk+-strict-aliasing.patch.
-* Thu Aug 18 2005 gekker@xxxxxxx
+* Wed Aug 17 2005 gekker@xxxxxxx
- Update version to 2.8.0 (GNOME2.12)
* Fri Aug 12 2005 gekker@xxxxxxx
- Fix crash in file chooser b.g.o (310270).
-* Thu Aug 11 2005 gekker@xxxxxxx
+* Wed Aug 10 2005 gekker@xxxxxxx
- Update to version 2.7.5
- Remove upstreamed patch
* Wed Aug 10 2005 clahey@xxxxxxx
@@ -1116,7 +1124,7 @@
- Fixed uninitialized variable warnings.
* Mon Jun 20 2005 sbrabec@xxxxxxx
- Create icon-cache files by SuSEconfig (#88599).
-* Fri Jun 17 2005 gekker@xxxxxxx
+* Thu Jun 16 2005 gekker@xxxxxxx
- Fix gtk64.patch and build on x86_64.
* Thu Jun 16 2005 gekker@xxxxxxx
- Update to version 2.6.8.
@@ -1125,7 +1133,7 @@
- Use current name for XFree86-devel in Requires (#54136).
* Mon May 02 2005 gekker@xxxxxxx
- Fix crasher in gtktextview (380).
-* Mon Apr 04 2005 aj@xxxxxxx
+* Sun Apr 03 2005 aj@xxxxxxx
- Disable visibility to build with GCC4. This should be
enabled again once gtk is fixed.
* Fri Mar 18 2005 gekker@xxxxxxx
@@ -1222,7 +1230,7 @@
- Updated to version 2.2.4.
* Thu Aug 28 2003 sbrabec@xxxxxxx
- Updated to version 2.2.3.
-* Thu Jul 24 2003 hhetter@xxxxxxx
+* Wed Jul 23 2003 hhetter@xxxxxxx
- fix SuSEconfig.gtk2 query paths
* Wed Jul 16 2003 sbrabec@xxxxxxx
- SuSEconfig.gtk2: Fixed paths to query binaries.
@@ -1238,7 +1246,7 @@
- Fixed directory packaging.
* Wed May 28 2003 sbrabec@xxxxxxx
- Include manpage to devel package.
-* Wed May 28 2003 ro@xxxxxxx
+* Tue May 27 2003 ro@xxxxxxx
- remove unpackaged files from buildroot
* Thu May 22 2003 sbrabec@xxxxxxx
- Fixed typo in Requires for -devel package (#27025).
@@ -1251,7 +1259,7 @@
theme problems for all session types).
* Wed Mar 12 2003 sbrabec@xxxxxxx
- Fixed prefix clash for keyboard themes (fixes bug 25086).
-* Mon Feb 10 2003 ro@xxxxxxx
+* Sun Feb 09 2003 ro@xxxxxxx
- create /etc/gtk-2.0 in SuSEconfig.gtk2 if needed
* Thu Feb 06 2003 sbrabec@xxxxxxx
- Updated to version 2.2.1.
@@ -1353,7 +1361,7 @@
* Memory leak and UMR fixes
* Misc bug fixes
* Updated translations
-* Thu Jun 13 2002 ro@xxxxxxx
+* Wed Jun 12 2002 ro@xxxxxxx
- use libpng-devel-packages in nededforbuild
* Mon Jun 10 2002 meissner@xxxxxxx
- Need to use -mminimal-toc for ppc64.

++++++ gtk2-bnc355503-file-chooser-remember-geometry.diff ++++++
bnc355503 - Make the file chooser remember its size across invocations

diff --git a/gtk/gtkfilechooserdefault.c b/gtk/gtkfilechooserdefault.c
index 16759a1..436246f 100644
--- a/gtk/gtkfilechooserdefault.c
+++ b/gtk/gtkfilechooserdefault.c
@@ -34,6 +34,7 @@
#include "gtkexpander.h"
#include "gtkfilechooserprivate.h"
#include "gtkfilechooserdefault.h"
+#include "gtkfilechooserdialog.h"
#include "gtkfilechooserembed.h"
#include "gtkfilechooserentry.h"
#include "gtkfilechoosersettings.h"
@@ -5986,6 +5987,23 @@ settings_load (GtkFileChooserDefault *impl)
}

static void
+save_dialog_geometry (GtkFileChooserDefault *impl, GtkFileChooserSettings
*settings)
+{
+ GtkWindow *toplevel;
+ int x, y, width, height;
+
+ toplevel = get_toplevel (GTK_WIDGET (impl));
+
+ if (!(toplevel && GTK_IS_FILE_CHOOSER_DIALOG (toplevel)))
+ return;
+
+ gtk_window_get_position (toplevel, &x, &y);
+ gtk_window_get_size (toplevel, &width, &height);
+
+ _gtk_file_chooser_settings_set_geometry (settings, x, y, width, height);
+}
+
+static void
settings_save (GtkFileChooserDefault *impl)
{
GtkFileChooserSettings *settings;
@@ -5996,6 +6014,8 @@ settings_save (GtkFileChooserDefault *impl)
_gtk_file_chooser_settings_set_show_hidden (settings,
gtk_file_chooser_get_show_hidden (GTK_FILE_CHOOSER (impl)));
_gtk_file_chooser_settings_set_expand_folders (settings,
impl->expand_folders);

+ save_dialog_geometry (impl, settings);
+
/* NULL GError */
_gtk_file_chooser_settings_save (settings, NULL);

@@ -7825,6 +7845,22 @@ gtk_file_chooser_default_get_default_size
(GtkFileChooserEmbed *chooser_embed,
|| impl->action == GTK_FILE_CHOOSER_ACTION_SELECT_FOLDER
|| impl->expand_folders)
{
+ GtkFileChooserSettings *settings;
+ int x, y, width, height;
+
+ settings = _gtk_file_chooser_settings_new ();
+ _gtk_file_chooser_settings_get_geometry (settings, &x, &y, &width,
&height);
+ g_object_unref (settings);
+
+ if (x >= 0 && y >= 0 && width > 0 && height > 0)
+ {
+ GtkWindow *toplevel;
+
+ *default_width = width;
+ *default_height = height;
+ return;
+ }
+
find_good_size_from_style (GTK_WIDGET (chooser_embed), default_width,
default_height);

if (impl->preview_widget_active &&
diff --git a/gtk/gtkfilechooserdialog.c b/gtk/gtkfilechooserdialog.c
index ec42374..27e8225 100644
--- a/gtk/gtkfilechooserdialog.c
+++ b/gtk/gtkfilechooserdialog.c
@@ -25,6 +25,7 @@
#include "gtkfilechooserwidget.h"
#include "gtkfilechooserutils.h"
#include "gtkfilechooserembed.h"
+#include "gtkfilechoosersettings.h"
#include "gtkfilesystem.h"
#include "gtktypebuiltins.h"
#include "gtkintl.h"
@@ -155,26 +156,17 @@ file_chooser_widget_file_activated (GtkFileChooser
*chooser,
}

static void
-clamp_to_screen (GtkWidget *widget,
- gint *width,
- gint *height)
+load_position (int *out_xpos, int *out_ypos)
{
- GdkScreen *screen;
- int monitor_num;
- GdkRectangle monitor;
+ GtkFileChooserSettings *settings;
+ int x, y, width, height;

- g_return_if_fail (GTK_WIDGET_REALIZED (widget));
-
- screen = gtk_widget_get_screen (widget);
- monitor_num = gdk_screen_get_monitor_at_window (screen, widget->window);
-
- gdk_screen_get_monitor_geometry (screen, monitor_num, &monitor);
-
- if (width)
- *width = MIN (*width, (monitor.width * 3) / 4);
+ settings = _gtk_file_chooser_settings_new ();
+ _gtk_file_chooser_settings_get_geometry (settings, &x, &y, &width, &height);
+ g_object_unref (settings);

- if (height)
- *height = MIN (*height, (monitor.height * 3) / 4);
+ *out_xpos = x;
+ *out_ypos = y;
}

static void
@@ -182,9 +174,9 @@ file_chooser_widget_default_size_changed (GtkWidget
*widget,
GtkFileChooserDialog *dialog)
{
GtkFileChooserDialogPrivate *priv;
- gint width, height;
gint default_width, default_height;
GtkRequisition req, widget_req;
+ int xpos, ypos;

priv = GTK_FILE_CHOOSER_DIALOG_GET_PRIVATE (dialog);

@@ -197,27 +189,18 @@ file_chooser_widget_default_size_changed (GtkWidget
*widget,
* that widget->requisition is meaningful. */
gtk_widget_size_request (GTK_WIDGET (dialog), &req);
gtk_widget_size_request (widget, &widget_req);
-
- width = req.width - widget_req.width;
- height = req.height - widget_req.height;
- }
- else
- {
- width = GTK_WIDGET (dialog)->allocation.width - widget->allocation.width;
- height = GTK_WIDGET (dialog)->allocation.height -
widget->allocation.height;
}

_gtk_file_chooser_embed_get_default_size (GTK_FILE_CHOOSER_EMBED
(priv->widget),
&default_width, &default_height);
+ load_position (&xpos, &ypos);

- /* Ideal target size plus any extra size */
- width = default_width + width + (2 * GTK_CONTAINER (dialog)->border_width);
- height = default_height + height + (2 * GTK_CONTAINER
(dialog)->border_width);
-
- if (GTK_WIDGET_REALIZED (dialog))
- clamp_to_screen (GTK_WIDGET (dialog), &width, &height);
-
- gtk_window_resize (GTK_WINDOW (dialog), width, height);
+ gtk_window_resize (GTK_WINDOW (dialog), default_width, default_height);
+ if (xpos >= 0 && ypos >= 0)
+ {
+ gtk_window_set_position (GTK_WINDOW (dialog), GTK_WIN_POS_NONE);
+ gtk_window_move (GTK_WINDOW (dialog), xpos, ypos);
+ }
}

static void
diff --git a/gtk/gtkfilechoosersettings.c b/gtk/gtkfilechoosersettings.c
index b80d362..c887928 100644
--- a/gtk/gtkfilechoosersettings.c
+++ b/gtk/gtkfilechoosersettings.c
@@ -41,6 +41,10 @@
#define LOCATION_MODE_KEY "LocationMode"
#define SHOW_HIDDEN_KEY "ShowHidden"
#define EXPAND_FOLDERS_KEY "ExpandFolders"
+#define GEOMETRY_X_KEY "GeometryX"
+#define GEOMETRY_Y_KEY "GeometryY"
+#define GEOMETRY_WIDTH_KEY "GeometryWidth"
+#define GEOMETRY_HEIGHT_KEY "GeometryHeight"

#define MODE_PATH_BAR "path-bar"
#define MODE_FILENAME_ENTRY "filename-entry"
@@ -60,6 +64,24 @@ get_config_filename (void)
}

static void
+get_int_key (GKeyFile *key_file, const char *group, const char *key, int
*out_value)
+{
+ GError *error;
+ int val;
+
+ error = NULL;
+ val = g_key_file_get_integer (key_file, group, key, &error);
+
+ if (val == 0 && error != NULL)
+ {
+ *out_value = -1;
+ g_error_free (error);
+ }
+ else
+ *out_value = val;
+}
+
+static void
ensure_settings_read (GtkFileChooserSettings *settings)
{
GError *error;
@@ -127,6 +149,11 @@ ensure_settings_read (GtkFileChooserSettings *settings)
else
settings->expand_folders = value != FALSE;

+ get_int_key (key_file, SETTINGS_GROUP, GEOMETRY_X_KEY,
&settings->geometry_x);
+ get_int_key (key_file, SETTINGS_GROUP, GEOMETRY_Y_KEY,
&settings->geometry_y);
+ get_int_key (key_file, SETTINGS_GROUP, GEOMETRY_WIDTH_KEY,
&settings->geometry_width);
+ get_int_key (key_file, SETTINGS_GROUP, GEOMETRY_HEIGHT_KEY,
&settings->geometry_height);
+
out:

g_key_file_free (key_file);
@@ -148,6 +175,11 @@ _gtk_file_chooser_settings_init (GtkFileChooserSettings
*settings)
settings->location_mode = LOCATION_MODE_PATH_BAR;
settings->show_hidden = FALSE;
settings->expand_folders = FALSE;
+
+ settings->geometry_x = -1;
+ settings->geometry_y = -1;
+ settings->geometry_width = -1;
+ settings->geometry_height = -1;
}

GtkFileChooserSettings *
@@ -198,6 +230,34 @@ _gtk_file_chooser_settings_set_expand_folders
(GtkFileChooserSettings *settings,
settings->expand_folders = expand_folders != FALSE;
}

+void
+_gtk_file_chooser_settings_get_geometry (GtkFileChooserSettings *settings,
+ int *out_x,
+ int *out_y,
+ int *out_width,
+ int *out_height)
+{
+ ensure_settings_read (settings);
+
+ *out_x = settings->geometry_x;
+ *out_y = settings->geometry_y;
+ *out_width = settings->geometry_width;
+ *out_height = settings->geometry_height;
+}
+
+void
+_gtk_file_chooser_settings_set_geometry (GtkFileChooserSettings *settings,
+ int x,
+ int y,
+ int width,
+ int height)
+{
+ settings->geometry_x = x;
+ settings->geometry_y = y;
+ settings->geometry_width = width;
+ settings->geometry_height = height;
+}
+
gboolean
_gtk_file_chooser_settings_save (GtkFileChooserSettings *settings,
GError **error)
@@ -238,6 +298,14 @@ _gtk_file_chooser_settings_save (GtkFileChooserSettings
*settings,
SHOW_HIDDEN_KEY, settings->show_hidden);
g_key_file_set_boolean (key_file, SETTINGS_GROUP,
EXPAND_FOLDERS_KEY, settings->expand_folders);
+ g_key_file_set_integer (key_file, SETTINGS_GROUP,
+ GEOMETRY_X_KEY, settings->geometry_x);
+ g_key_file_set_integer (key_file, SETTINGS_GROUP,
+ GEOMETRY_Y_KEY, settings->geometry_y);
+ g_key_file_set_integer (key_file, SETTINGS_GROUP,
+ GEOMETRY_WIDTH_KEY, settings->geometry_width);
+ g_key_file_set_integer (key_file, SETTINGS_GROUP,
+ GEOMETRY_HEIGHT_KEY, settings->geometry_height);

contents = g_key_file_to_data (key_file, &len, error);
g_key_file_free (key_file);
diff --git a/gtk/gtkfilechoosersettings.h b/gtk/gtkfilechoosersettings.h
index c7c4179..94d2e3a 100644
--- a/gtk/gtkfilechoosersettings.h
+++ b/gtk/gtkfilechoosersettings.h
@@ -38,6 +38,11 @@ struct _GtkFileChooserSettings

LocationMode location_mode;

+ int geometry_x;
+ int geometry_y;
+ int geometry_width;
+ int geometry_height;
+
guint settings_read : 1;

guint show_hidden : 1;
@@ -66,6 +71,17 @@ gboolean _gtk_file_chooser_settings_get_expand_folders
(GtkFileChooserSettings *
void _gtk_file_chooser_settings_set_expand_folders (GtkFileChooserSettings
*settings,
gboolean
expand_folders);

+void _gtk_file_chooser_settings_get_geometry (GtkFileChooserSettings *settings,
+ int *out_x,
+ int *out_y,
+ int *out_width,
+ int
*out_heigth);
+void _gtk_file_chooser_settings_set_geometry (GtkFileChooserSettings *settings,
+ int x,
+ int y,
+ int width,
+ int heigth);
+
gboolean _gtk_file_chooser_settings_save (GtkFileChooserSettings *settings,
GError **error);


++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++



Remember to have fun...

--
To unsubscribe, e-mail: opensuse-commit+unsubscribe@xxxxxxxxxxxx
For additional commands, e-mail: opensuse-commit+help@xxxxxxxxxxxx

< Previous Next >