Commit Graph

10285 Commits

Author SHA1 Message Date
Carlos Garcia Campos
9a0e81380b printing: Make sure destroy function is always called by gtk_enumerate_printers
When GtkPrinterFunc always returns FALSE, for example when looking for
a non existent printer, if print list is done for all backends or print
backend status is UNAVAILABLE, gtk_enumerate_printers() finishes with an
empty backend list and destroy function is never called. We need to
check the backend list again after calling list_printers_init for all
backends and finish the enumeration if it's empty.

https://bugzilla.gnome.org/show_bug.cgi?id=672125
2012-03-15 14:49:00 +01:00
Javier Jardón
339786f078 build: require glib 2.28
As dieterv said, gtk 2.24 win32 binaries have been frozen on
glib 2.28.x, and we dont have resources rigth now to ensure pygobject
static bindings still function correctly with newer glib versions
2012-03-14 19:28:55 +00:00
Federico Mena Quintero
2bedcd8863 Use g_format_size() instead of g_format_size_for_display()
We do this like in commit 4ead7b69ea, so that apps which use the gtk2 file chooser
will show the same file sizes as gtk3 apps.
2012-03-05 17:21:55 -06:00
Benjamin Otte
4b1e2b08a7 iconview: Fix autoscroll
... when the iconview is not the only child in it's parent GdkWindow.
2012-03-03 21:12:19 +01:00
Matthias Clasen
8da54b8118 GtkTrayIcon: chain up in dispose
Pointed out in bug 643131 and bug 640308.
2012-02-15 15:16:30 +00:00
Kalev Lember
bbe8ba8aff win32: Don't crash when installed in a top-level directory
Avoid NULL-pointer dereference when package installation directory
doesn't contain any slashes.

Reported by Paweł Forysiuk.
2012-02-09 18:00:08 +02:00
John Ralls
14488e69c4 Remove stock_icons/*/text-x-generic.png from GENERATED_ICONS
It's not generated, and having it included removes it during
maintainer-clean so you have to retrieve it from the repo to build.
2012-02-07 16:03:28 -08:00
Benjamin Otte
b96f423343 modules: Fix memleak
Modules would leak if they were specified twice in the same command,
so ie this would leak:
  GTK_MODULES=gail,gail
2012-01-24 17:46:22 +01:00
Benjamin Otte
ab6007f052 modules: break when finding the right module
This way, we don't use the wrong module. In particular we don't screw up
refcounts that lead to crashes later on.
2012-01-24 17:46:14 +01:00
Stefan Sauer
308d195014 scale: Fix marks for inverted scales
This is a backport of the fix from gtk-3.
2012-01-20 21:57:21 +01:00
Stefan Sauer
9adc078e25 scale: remove the match argument from find_next_pos()
Using the 'pos' argument is enough.
2012-01-20 21:57:21 +01:00
Matthias Clasen
165d2c0ca2 Implement the editing-canceled property in GtkCellEditableEventBox
https://bugzilla.gnome.org/show_bug.cgi?id=639455
(cherry picked from commit 8f6a8441a2)
2012-01-20 11:47:50 +01:00
Carlos Garcia Campos
5123cfe5e6 printing: gtk_print_settings_load_key_file() ignores group_name 2012-01-11 15:46:15 +01:00
Stefan Sauer
03fae9086f scale: backport orientation fix for vertical scales 2012-01-09 18:39:13 +01:00
Stefan Sauer
92412d23b7 gtkscale: fix bogus compare func
The GtkScaleMark values are gdouble, a simple a-b compare func would fail for
values with the same integer value. This breaks the sorting and causes random
marker label placement.
2012-01-09 18:16:53 +01:00
Ryan Lortie
986072b361 introspection: Fix srcdir != builddir builds
https://bugzilla.gnome.org/show_bug.cgi?id=667458
2012-01-09 17:08:12 +01:00
Benjamin Berg
1e731a3400 Improve PICKONE_* handling in GtkPrinterOptionWidget (bug #543520)
This patch modifies GtkPrinterOptionWidget to support loading them
again. It also allows the user to enter values from the dropdown list
to select the item.
2012-01-06 00:18:38 +01:00
Matthias Clasen
fcd01e9718 Use the right icon-name for missing images
Patch by Erik van Pienbroek, bug 629878.
2012-01-05 14:30:48 -05:00
Federico Mena Quintero
400e53c568 bgo#662814 - Don't print a g_warning() when GtkRecentManager can't find a file
Also, *do* add the file to the recently-used list, even if the file does not
exist yet.  This is used from the Save dialog, so even shitty apps which don't
add the file to GtkRecentManager, will get the file added from the Save dialog.

Signed-off-by: Federico Mena Quintero <federico@gnome.org>
2011-12-13 11:07:42 -06:00
Matthias Clasen
4eae58ab43 Revert be1eea612c
Calling gdk_keymap_add_virtual_modifiers causes _all_ virtual
modifiers to be added, which causes problem when they are co-located
on the same real modifier (as Super and Hyper often are). Effectively,
this made it impossible to enter key combinations involving Super,
since they all turn into Super+Hyper.
2011-12-08 12:46:55 -05:00
Florian Müllner
26b749440b build: Add gmodule-2.0 dependency for gtk-query-immodules-2.0 2011-11-28 15:11:06 -05:00
John Ralls
7c77f9a69a [Bug 664238] GTK apps crash when dragging something
Corrects a bad condition in a test in fadc82ad.
2011-11-20 10:28:15 -08:00
Michael Natterer
2e06f63743 Bug 663856 - Make option-foo accelerators use the right symbol
If the keyboard group shifting modifier is *also* a normal
accelerator modifier, we need to special case it when calling
gdk_keymap_translate_keyboard_state(), so we get the right
key symbol for accelerators (for example we want Option-O,
not Option-Ø displayed in menu items). This patch should only
affect quartz where the Alt key both shifts the group and can
be used as accel modifier, and not X11 or Win32 where AltGr
is not used for accelerators.

- fix quartz' gdk_keymap_translate_keyboard_state() to return
  the right consumed_modifiers
- add _gtk_translate_keyboard_accel_state() which does the
  special casing
- use it everywhere instead of gdk_keymap_translate_keyboard_state()
2011-11-18 12:25:03 +01:00
Michael Natterer
4c35d987df notebook: don't leak the action widgets
The notebook owns them, so it must destroy them in destroy().
2011-11-17 00:53:29 +01:00
Cosimo Cecchi
5c3bb1839c Revert "iconview: layout items immediately when setting a GtkTreeModel"
It makes GtkIconView segfault on GTK 2.24.

gtk_icon_view_expose() calls gtk_icon_view_layout() first thing if
there's a layout queued anyway, so we wouldn't end up in the same
situation causing the crash the original patch is supposed to fix.

This reverts commit 5a03f4a6a5.

https://bugzilla.gnome.org/show_bug.cgi?id=663138
2011-11-16 17:39:18 -05:00
Kristian Rietveld
013c9169f6 Bug 661997 - Gtk crashes when changing the TreeView model while ...
Simply stopping rubber banding in gtk_tree_view_set_model() eliminates
the crash.  Reported by Thomas Perl.
(cherry picked from commit 91ae19768e)
2011-11-09 08:49:12 +01:00
Matthias Clasen
7e1e5451d4 Don't use deprecated Pango api 2011-11-08 12:40:58 -05:00
Cosimo Cecchi
5a03f4a6a5 iconview: layout items immediately when setting a GtkTreeModel
As the draw handler expects the items to be laid out already, we cannot
queue a layout here to avoid a race condition with the resize that is
queued immediately after, which in turn would lead to a segfault later
in the paint_item() implementation.

https://bugzilla.gnome.org/show_bug.cgi?id=663138
2011-11-08 12:40:31 -05:00
Matthias Clasen
b424735a39 Print dialog: small keynav improvement
Mark the page range entry and the copies spin button as
activates-default.

https://bugzilla.gnome.org/show_bug.cgi?id=662670
2011-11-08 12:40:11 -05:00
Matthias Clasen
0f22ef3f31 GtkSearchEngineTracker: port to tracker 0.12
We simply use the Tracker DBus api here, caching and direct
access that come with libtracker-sparql are probably not needed
here. Based on a patch by Martyn Russell.

https://bugzilla.gnome.org/show_bug.cgi?id=658272
2011-11-08 12:36:23 -05:00
Antoine Jacoutot
4a22e2ceab gtkmountoperation-x11: unbreak compilation on OpenBSD.
Add missing header to prevent undeclared definitions.
Bug #659565
2011-11-08 12:31:46 -05:00
John Ralls
fadc82ad26 [Quartz Bug 663182] NSImage throws an exception from _gtk_quartz_create_image_from_pixbuf()
If _gtk_quartz_create_image_from_pixbuf is given a pixbuf with size 0, 0
or which produces an NSImage with size 0.0, 0.0, it throws an exception
which Gtk doesn't handle.
2011-11-07 13:41:14 -08:00
Alexander Larsson
c3601481b7 Merge branch 'gtk-2-24-win32' into gtk-2-24 2011-11-07 15:07:01 +01:00
Michael Natterer
0a0fd5af99 Bug 662633 - Scheduled transaction editor crashes with gtk+-2.24.7
Fix commit a516d2359c: check if
priv->arrow_button exists in forall().
2011-11-02 20:27:39 +01:00
Alexander Larsson
6cb04372f0 win32: Hack to make statusbar menus show up visible: 2011-11-02 16:11:54 +01:00
Alexander Larsson
e943d7d8e1 Don't show text in file selector bookmark toolbar
The text is empty anyway.
2011-11-02 14:48:21 +01:00
Alexander Larsson
49d017dcb9 win32: Default to MS-Windows theme
It really makes little sense to not look like windows apps on windows.
If you really want you can change this via a .gtkrc-2.0 file
2011-11-01 14:23:44 +01:00
Michael Natterer
e81b6971d8 gtkrc.key.mac: add '"' missing from last commit 2011-10-28 10:19:24 +02:00
Morten Welinder
afce8c7341 win32: Actually check for IPrintDialogCallback in configure 2011-10-28 09:10:40 +02:00
Michael Natterer
ccf12f7b40 gtkrc.key.mac: add Command-cursor text navigation
and some emacs-ish Control bindings that work in native widgets.
Patch from Michael Hutchinson.
2011-10-25 22:19:11 +02:00
Michael Natterer
79a92f99a9 gtkrc.key.mac: remove half the file, it was an accidential double paste 2011-10-25 17:01:25 +02:00
Michael Natterer
c040b03c2e gtkquartz: don't free the string returned by get_bundle_path()
It's statically allocated.
2011-10-22 23:08:32 +02:00
Matthias Clasen
7299d70760 Fix make check 2011-10-17 18:42:12 -04:00
John Ralls
c34c302308 Bug 658772: Directory paths for resource directories are hard coded.
Corrected formatting to match coding standards; introduced local statics
to prevent leaking returned strings.
2011-10-15 12:49:12 -07:00
Javier Jardón
fb99ca1979 gtkentrycompletion: check return value because It can be non-UTF8
Fixes https://bugzilla.gnome.org/show_bug.cgi?id=624270
2011-10-13 14:01:08 +01:00
John Ralls
0d0412bcc9 Bug 658772: Directory paths for resource directories are hard coded.
Provide dynamic path discovery functions as are provided for win32.
2011-10-08 18:08:29 -07:00
Michael Natterer
21e971b3cb gtk: also define the default *virtual* accel mod mask
and use it in stock items and GtkAccelGroup. Change the non-virtual
one to MOD2 on OSX, so hardcoded accelerators in the IM context and
the treeview work.
2011-10-07 20:13:09 +02:00
John Ralls
aeae02d3e6 Bug 628396: Gtk build fails because of objective-c elements 2011-10-04 17:37:17 -07:00
John Ralls
81c2166eb9 Quartz: Fix a typo and a compilation warning 2011-09-25 14:44:54 -07:00
John Ralls
d08d4507c9 Bug 658767 - Drag and Drop NSEvent capture is racy
Create a synthetic NSMouseLeftDown to store in the GtkQuartzDragSourceInfo
rather than relying on the NSWindow's latest event being the right one (or the
right kind).
2011-09-25 12:15:50 -07:00
Kristian Rietveld
4e64f6012f Bug 657770 - Write to released memory in gtkdnd-quartz.c
Clear the Drag paste board just before the info->context is released.
This way the GtkDragSourceOwner is released just before the drag context
is and thus can pasteboard:provideDataForType: not accidentally access
an already released drag context
2011-09-25 12:13:23 -07:00
John Ralls
94fc15ad95 Bug 653450 - gtkfilechooser crashes when added favorite
Ensure that display is set during drag-and-drop, and that string lists'
memory is zeroed after allocation to prevent g_strfreev() from
over-running.
2011-09-24 10:56:05 -07:00
Michael Natterer
25227a715e GtkLinkButton: forgot to #include "gtkprivate.h" 2011-09-20 08:58:03 +02:00
Javier Jardón
5da4473e27 gtkcomboboxtext: Some documentation fixes
Fixes https://bugzilla.gnome.org/show_bug.cgi?id=656053
2011-09-19 13:50:11 +02:00
Michael Natterer
a516d2359c gtk: fix warning when finalizing a GtkToolbar
Move destruction of child widgets from finalize() to dispose()
because unparenting emits a signal with old_parent as object
parameter, which tries to ref the toolbar that is being
finalized.
2011-09-19 01:05:26 +02:00
Michael Natterer
7be2ea823d Bug 659406 - Abstract what triggers a context menu
Add _gtk_button_event_triggers_context_menu() and use it instead
of checking for event->button == 3, so context menus are invoked
correctly on the Mac.
2011-09-19 00:32:52 +02:00
Michael Natterer
2666c0e71f app: abstract which modifiers are used for extending and modifying selections
which are SHIFT and MOD2 on the Mac, and SHIFT and CONTROL otherwise.
Use the new define all over the place and rename variables and
members to not say "shift" or "control".
2011-09-17 20:05:33 +02:00
Michael Natterer
9ea7ae84fa gtk: never undo, save, commit :( sorry... 2011-09-17 19:37:08 +02:00
Michael Natterer
b057a311e7 gtk: use GTK_NO_TEXT_INPUT_MOD_MASK also in gtkfilechooserdefault.c 2011-09-17 15:25:02 +02:00
Michael Natterer
1f6a921158 gtk: allow to specify accelerators in a platform-independent way
Introduce <Primary> in accelerator strings, which resolves to
GDK_CONTROL_MASK on X11/Win23, and to GDK_META_MASK on quartz.
Also serialize CONTROL/META as <Primary> depending on the platform.
2011-09-16 16:12:23 +02:00
Michael Natterer
812678a70c gtk: fix entering of Option-foo symbols on the Mac
and use it in the IM contexts, so Option-foo is no longer
filtered away.
2011-09-16 16:10:06 +02:00
Michael Natterer
659df720ca gtk: use GTK_DEFAULT_ACCEL_MOD_MASK instead of GDK_CONTROL_MASK in gtkstock.c 2011-09-16 15:56:29 +02:00
Michael Natterer
d83c86d42e gtk: disable mnemonics in gtkrc.key.mac, they don't exist on the Mac 2011-09-16 15:51:33 +02:00
Michael Natterer
be1eea612c gtk: enable setting virtual modifiers in GtkCellRendererAccel
Call gdk_keymap_add_virtual_modifiers() on event->state,
so virtual modifiers get added at all.
2011-09-16 15:39:23 +02:00
Federico Mena Quintero
a350b667c1 Merge branch 'filechooser-recent-folders-2-24' into gtk-2-24 2011-09-13 15:26:05 -05:00
Federico Mena Quintero
2a2edc9564 bgo#658600 - Don't try to focus the location entry in Recent-files mode
We don't ever start up in Search mode, so we don't need an extra check for that mode, yet.

Signed-off-by: Federico Mena Quintero <federico@gnome.org>
2011-09-13 15:25:52 -05:00
John Ralls
87ad09a8ee bgo#514843 - [filechooser] Deal with corrupted .gtk-bookmarks gracefully
We weren't checking for the lines in that file being valid UTF-8 strings.
2011-09-12 14:27:40 -05:00
William Jon McCann
dafc1eda80 Don't call object notify for something that isn't a property 2011-09-04 23:00:57 +02:00
Micah Carrick
bd37724faf Fix annotation for Gtk.TreeView.enable_model_drag_source
https://bugzilla.gnome.org/show_bug.cgi?id=649979
2011-09-01 11:49:20 -05:00
Federico Mena Quintero
425c2e93a8 Merge branch 'filechooser-recent-folders-2-24' into gtk-2-24 2011-09-01 11:42:00 -05:00
Federico Mena Quintero
e0f3b18c37 bgo#657949 - [filechooser] Don't ellipsize filter names for 2.24
That only works well in 3.0, where the natural-sizing code works to get us a good default size
for the filters drop-down.
2011-09-01 11:41:54 -05:00
Federico Mena Quintero
1d94ae433a Merge branch 'filechooser-recent-folders-2-24' into gtk-2-24
This contains the fixes to centralize the handling of the pathbar, recent-files widgets,
and filename entry - the entry would sometimes be missing before these fixes.

This also contains a fix to the recently-used mode, so that the file list is indeed
sorted in newer-to-older order.
2011-09-01 11:25:47 -05:00
Matthias Clasen
7667f9330b Disable a nonworking test
Same as on GTK+ 3.x
2011-08-30 16:21:19 -04:00
Matthias Clasen
55e1b27c6f trayicon-x11: Fix warnings when visual is not available.
This fixes a regression introduced in commit
b1a1685a33eca16979e63d79915395af0b36. gdk_visual_get_*_pixel_details()
should not be called with a NULL visual.

https://bugzilla.gnome.org/show_bug.cgi?id=649588
2011-08-30 14:31:00 -04:00
Matthias Clasen
627af13e74 Make gtk_status_icon_set_name() work reliably 2011-08-30 14:23:59 -04:00
Federico Mena Quintero
b229df22c1 bgo#657186 - Sort the recent-files list in newest-to-oldest order
Otherwise it's not very useful... :)

Signed-off-by: Federico Mena Quintero <federico@gnome.org>
2011-08-30 11:21:13 -05:00
Federico Mena Quintero
6e31bc1128 Load and populate the recent-items in a single pass
There's no real asynchronicity going on, anyway, so let's do both within
a single iteration of the idle handler.

Signed-off-by: Federico Mena Quintero <federico@gnome.org>
2011-08-30 11:21:09 -05:00
Federico Mena Quintero
37f9feebd2 Don't sort the recent-items by hand
The mtime from GtkRecentManager may not the same as the file's actual
mtime, so the final result could appear unsorted to the user.  Instead,
we will let the view do the sorting.

Signed-off-by: Federico Mena Quintero <federico@gnome.org>
2011-08-30 11:21:04 -05:00
Federico Mena Quintero
79d16aab2b Set the location mode when changing the operation mode
Signed-off-by: Federico Mena Quintero <federico@gnome.org>
2011-08-30 11:20:45 -05:00
Federico Mena Quintero
aa8f54b736 Switch to OPERATION_MODE_BROWSE when switching to volume or file shortcuts
Signed-off-by: Federico Mena Quintero <federico@gnome.org>
2011-08-30 11:20:39 -05:00
Federico Mena Quintero
70cc1add13 Remove the unused, initial-text logic from the location entry
Years ago, when the location entry only appeared in a popup window, it used to appear
populated with the current folder's path.  We had some logic to do this, but since now
the location entry appears in the main dialog, we can do away with that old code.

Signed-off-by: Federico Mena Quintero <federico@gnome.org>
2011-08-30 11:20:31 -05:00
Federico Mena Quintero
22d84f6277 Create the location_entry in a single function
We had duplicated code to create the entry in two cases, for Open and for Save modes.

Signed-off-by: Federico Mena Quintero <federico@gnome.org>
2011-08-30 11:20:24 -05:00
Federico Mena Quintero
dfe7018284 Only unset the entry's contents if the entry exists
Signed-off-by: Federico Mena Quintero <federico@gnome.org>
2011-08-30 11:20:19 -05:00
Federico Mena Quintero
388143d563 Discard the search widgets in a separate function
Signed-off-by: Federico Mena Quintero <federico@gnome.org>
2011-08-30 11:20:13 -05:00
Federico Mena Quintero
db9665ae08 Move the widgets above the hpaned to their own box
This way we can re-create the contents of that box easily without disrupting
the rest of the file chooser.

Signed-off-by: Federico Mena Quintero <federico@gnome.org>
2011-08-30 11:19:58 -05:00
Federico Mena Quintero
ad82bc60ff Make operation_mode_set() handle SEARCH and RECENT modes as well
Signed-off-by: Federico Mena Quintero <federico@gnome.org>
2011-08-30 11:17:09 -05:00
Federico Mena Quintero
f481458576 Centralize changing the operation mode in operation_mode_set()
This will be the central function to switch operation modes:  stop searches or the recent-files
process; switch widgets, etc.

We factor out the common code from recent_switch_to_browse_mode() and search_switch_to_browse_mode(),
and remove those functions.  All the code that switched modes by hand now calls
the central operation_mode_set().

Signed-off-by: Federico Mena Quintero <federico@gnome.org>
2011-08-30 11:17:03 -05:00
Federico Mena Quintero
cb4b82e370 Remove duplicated code from *_switch_to_browse_mode()
That code indeed lives in operation_mode_stop(), so use it instead of
having inlined duplicates.

Signed-off-by: Federico Mena Quintero <federico@gnome.org>
2011-08-30 11:16:58 -05:00
Federico Mena Quintero
6c51b34597 Rename stop_operation() to operation_mode_stop()
We'll now prefix functions to change the impl->operation_mode with 'operation_mode',
for clarity.

Signed-off-by: Federico Mena Quintero <federico@gnome.org>
2011-08-30 11:16:53 -05:00
Matthias Clasen
89d217c90a GtkColorButton: Don't forget to close a cairo context
Patch by Jerome Lambourg, bug 655392.
2011-08-27 01:52:24 -04:00
Michal Suchanek
5afa001a8d bgo#652045 - Initialize local_only in GtkFileChooserEntry
This has to be done also when we switch to the entry, otherwise completion for
non-local URIs won't work.
2011-08-17 11:01:43 -05:00
Kristian Rietveld
875e6f4bdb Bug 508601 - Copying from GTK+ applications causes crash
In GtkClipboardOwner pasteboard:provideDataForType do not call
_gtk_quartz_set_selection_data_for_pasteboard() is selection_data.length
is smaller than 0.  The function relies on having a positive length,
since it stores the length in a uint ...
2011-07-31 16:10:16 -07:00
Chun-wei Fan
8f8da26c18 Update Visual C++ compilation items
-Added Visual C++ 2010 project files.  They are like the VS 2008 projects
 where the GDK and GTK+ projects are filled-in templates, which are filled-
 in during 'make dist', and added related README.txt file, and add them
 into distribution
-Updated the VS 2008 README.txt to reflect the latest situation regarding
 dependencies etc.
-Updated README.win32 to tell people about the now-available VS2010 projects
-Updated config.h.win32.in as VS 2010 ships with stdint.h
2011-07-25 12:20:21 +08:00
Federico Mena Quintero
119df7415e Save selection to recent-files in the asynchronous Save cases
Various paths in SAVE or CREATE_FOLDER return from ::should_respond() but
leave an asynchronous process running.  This process checks some things
in the user's selection, for example, 'does the file exist, and if so
do we need to bring up an overwrite-confirmation dialog?'.  When these
async processes complete *and* it is indeed time for the dialog to
be terminated (via the response-requested signal), we also need to
save the selection to the recently-used list - as ::should_respond() does
by itself in the cases when it can request a response immediately.

Signed-off-by: Federico Mena Quintero <federico@gnome.org>
2011-07-13 16:37:37 -05:00
Federico Mena Quintero
1a3605a23f Don't dereference a NULL
Signed-off-by: Federico Mena Quintero <federico@gnome.org>
2011-07-13 15:39:20 -05:00
Federico Mena Quintero
6b0ab20bc7 Log to recent-files when confirming the file chooser
To make life easier for users, when apps don't properly update the recently-used list
after choosing a file, we now do that directly from the file chooser.

Signed-off-by: Federico Mena Quintero <federico@gnome.org>
2011-07-12 18:28:53 -05:00
Federico Mena Quintero
685a688470 No need to highlight the file's basename when setting the base folder
None of the cases where _gtk_file_chooser_entry_set_base_folder() appear to require
the entry highlighting the file's basename.  Doing the highlighting actually makes
things look weird in Save/Recent mode if you

  1. type a filename
  2. click on a recent-folder,

as right after (2) your filename would get its basename highlighted for
no apparent reason.

Signed-off-by: Federico Mena Quintero <federico@gnome.org>
2011-07-12 18:28:52 -05:00
Federico Mena Quintero
d4b30f53d9 Hide the Create Folder button in recent-files mode when the pathbar is on
The create-folder machinery doesn't handle that case yet; we may enable it later
once we figure out the implications for the GUI.

Signed-off-by: Federico Mena Quintero <federico@gnome.org>
2011-07-12 18:28:52 -05:00
Federico Mena Quintero
18e27a24a0 Centralize the setting of the pathbar's widgets
It used to be that every part of the file chooser's code would show/hide the widgets
near the pathbar as needed.  Now we have two central functions:

  path_bar_update()
  path_bar_set_mode()

These take care of all the widget shuffling;  setting the visibility of the
pathbar, info bar, and Create Folder button as appropriate; setting the contents
of the info bar, etc. - based on the current operation_mode and action.

Signed-off-by: Federico Mena Quintero <federico@gnome.org>
2011-07-12 18:28:52 -05:00
Federico Mena Quintero
180774e948 Create the recently-used widgets and infobar from the pathbar widgets as well
Signed-off-by: Federico Mena Quintero <federico@gnome.org>
2011-07-12 18:28:52 -05:00
Federico Mena Quintero
fef779f3b1 Move the pathbar creation to its own function
We will centralize the place where all the pathbar-related widgets are created:
the location button, the pathbar itself, the Create Folder button, and in
subsequent commits, the info bar as well.  We will deal with the pathbar/infobar
as a unit, instead of swapping them in and out in an ad-hoc fashion.

Signed-off-by: Federico Mena Quintero <federico@gnome.org>
2011-07-12 18:28:48 -05:00
Federico Mena Quintero
cd82e5ceb6 Warn the user when he still needs to type a filename or choose a folder
Signed-off-by: Federico Mena Quintero <federico@gnome.org>
2011-07-12 17:52:53 -05:00
Federico Mena Quintero
673de40aed Return the recent-folder plus filename in Save mode from get_files()
Since the GtkFileChooserEntry already gets the recent-folder set upon it when a recent-folder
is selected, it already can give us the correct fully-formed path.

Signed-off-by: Federico Mena Quintero <federico@gnome.org>
2011-07-12 17:52:43 -05:00
Federico Mena Quintero
3449a4891a Allow resolving absolute paths even if there is no base_folder
This lets us do proper completion in GtkFileChooserEntry even when no base folder
has been set.  Completion for relative paths won't work, as usual, as expected.
2011-07-12 17:52:30 -05:00
Federico Mena Quintero
91b8043397 Set the filename entry's base folder when a recent-folder is selected
This lets the filename entry do completion relative to the selected recent-folder.

Signed-off-by: Federico Mena Quintero <federico@gnome.org>
2011-07-12 17:52:21 -05:00
Federico Mena Quintero
03b50bd9a9 Instruct the user to pick a folder when nothing is selected in the recent-folders list
Signed-off-by: Federico Mena Quintero <federico@gnome.org>
2011-07-12 17:52:08 -05:00
Federico Mena Quintero
dacdb343db Put recently-used folders in the recently-used list
Signed-off-by: Federico Mena Quintero <federico@gnome.org>
2011-07-12 17:50:55 -05:00
Federico Mena Quintero
e4ffea1173 Turn a struct field into a local variable
Signed-off-by: Federico Mena Quintero <federico@gnome.org>
2011-07-12 17:50:44 -05:00
Federico Mena Quintero
dfdb51e324 Remove unused struct field
Signed-off-by: Federico Mena Quintero <federico@gnome.org>
2011-07-12 17:50:18 -05:00
Federico Mena Quintero
b602220e2f Actually highlight the 'recently used' and 'search' items in the shortcuts bar
They weren't being selected in the shortcuts bar when those modes were
activated programmatically, instead of through the user selecting
them from the user interface.
2011-07-12 17:50:08 -05:00
Federico Mena Quintero
ca74dc6a87 Start in recently-used mode when no folder is set
In RELOAD_EMPTY mode, when no folder has been selected by the calling app, we now
start showing the recently-used list.  The rationale is as follows:

  - In Open mode, the user is likely to pick a file he has used recently.

  - In Save mode, the user is likely to want a destination folder which
    he has used recently.

For the Save case, where we want to present the user with recent folders instead
of recent files, we will make the recent-list do so in subsequent commits.

Signed-off-by: Federico Mena Quintero <federico@gnome.org>
2011-07-12 17:49:47 -05:00
Stéphane Maniaci
76c24a4a81 Make GtkFileChoser remember the last directory opened
Introduces a 'LastFolderUri' settings key, where we remember the last-opened
folder from the previous instance of the file chooser.

The idea is that this works globally, across all applications, so it will be
easy to do things like

  1. Save an attachment from a mail (or some other file)
  2. Open another program
  3. Do File/Open and automatically get sent to the folder where (1) happened.

Signed-off-by: Federico Mena Quintero <federico@gnome.org>

https://bugzilla.gnome.org/show_bug.cgi?id=644426
2011-07-12 17:48:54 -05:00
Federico Mena Quintero
dd0ce5dd1e Put the pathbar in the 'Save in folder:' row in Save mode
Now we reparent the browse_path_bar_hbox to that spot in Save mode,
or to be above the file lists in Open mode.  The pathbar makes for a very
clear indication of the location to save in.

Signed-off-by: Federico Mena Quintero <federico@gnome.org>
2011-07-12 17:38:32 -05:00
Federico Mena Quintero
b9d00c42f8 Get rid of the save_folder_combo
And with this we get rid of the craziness of having a separate filter model
for the combobox's model.

Signed-off-by: Federico Mena Quintero <federico@gnome.org>
2011-07-12 17:36:22 -05:00
Federico Mena Quintero
0d02b8a681 Remove the expander in Save mode, and the configuration key
This effectively makes the file chooser always be in 'expanded' mode.
Later, we'll move the pathbar to the 'Save in folder:' line.

Signed-off-by: Federico Mena Quintero <federico@gnome.org>
2011-07-12 17:36:02 -05:00
Federico Mena Quintero
d3e822882a Utility function to extract folders from the recently-used list
This extracts the parent folders from the items in the recently-used
list.  We'll use it in the file chooser to present a list of
recently-used folders.

Signed-off-by: Federico Mena Quintero <federico@gnome.org>
2011-07-12 17:27:00 -05:00
Federico Mena Quintero
1b605ee84b gtkfilechooserdefault.c update to 3.0 2011-07-12 15:00:15 -05:00
Federico Mena Quintero
0661008ebe gtkfilechooserentry.c update to 3.0 2011-07-12 13:48:57 -05:00
Federico Mena Quintero
032a7e50d8 gtkfilechooserprivate.h update to 3.0 2011-07-12 13:36:44 -05:00
Federico Mena Quintero
9858099f65 gtkfilechooser.c update to 3.0 2011-07-12 13:35:45 -05:00
Federico Mena Quintero
0bbee739d3 gtkfilechooserbutton.c update to 3.0 2011-07-12 13:32:41 -05:00
Federico Mena Quintero
eec3cec225 gtkfilechooser.h update to 3.0 2011-07-12 13:23:10 -05:00
Federico Mena Quintero
a0280d7f36 gtkfilechooserdialog.c update to 3.0 2011-07-12 13:21:40 -05:00
Juan Pablo Ugarte
a5b92540d0 Make GtkBuilder do not delay construct properties that can be resolved
(so construct is respected when possible) and skip construct only props that
can not.
2011-06-29 11:48:18 -03:00
Mike Gorse
9f83204d48 bgo#653191 - fix uninitialized variable in gtk_file_chooser_entry.c 2011-06-27 15:05:25 -05:00
Javier Jardón
1516be6f69 gtk: Use 'const' instead G_RETURN_CONST 2011-06-15 19:03:44 +01:00
Daniel Drake
149750773e gtkdnd: Don't bind/unbind keycodes that couldn't be determined
At http://dev.laptop.org/ticket/10643 we are seeing that drag-and-drop
within the Sugar shell causes all of Sugar's custom keybindings to be
removed.

This is because gtkdnd tries to unbind XK_KP_Space, which (on my systems)
is resolved to NoSymbol by XKeycodeToKeysym(). NoSymbol has value 0,
the same as AnyKey, and XUngrabKey(AnyKey) is equivalent to unbinding
all possible keycodes.

Fix this by catching NoSymbol before binding/unbinding.

https://bugzilla.gnome.org/show_bug.cgi?id=652402
2011-06-13 15:10:11 +01:00
Marc-André Lureau
da746d5169 win32: fix gdk clipboard
https://bugzilla.gnome.org/show_bug.cgi?id=648931
2011-06-10 00:10:44 +02:00
Juan Pablo Ugarte
2e9e163bbf Fixed bug #576492 "GtkBuilder does not respect G_PARAM_CONSTRUCT properties"
Added G_PARAM_CONSTRUCT flag in gtk_builder_get_parameters() checks as suggested by Johan Dahlin.
2011-06-03 15:17:21 -03:00
Matthias Clasen
7a227b5806 Correct a deprecation note
https://bugzilla.gnome.org/show_bug.cgi?id=651048
2011-05-25 22:46:40 -04:00
Colin Walters
c4b2d3a144 gtkrc.c: Use g_ascii_dtostr for formatting floats
We should be locale-independent.

https://bugzilla.gnome.org/show_bug.cgi?id=647908
2011-04-27 17:10:34 -04:00
Benjamin Otte
19c145570a tracker-search: Fix includes 2011-04-26 19:33:23 +02:00
Jesse van den Kieboom
baf8bf967d Added out annotations for gtk_icon_size_lookup/_for_settings
Backported from master commit e36ba3465.

https://bugzilla.gnome.org/show_bug.cgi?id=637606
2011-04-21 10:58:13 +02:00
Matthias Clasen
c3a4f0f777 Document that gtk_container_propagate_expose is going away
Requested in https://bugzilla.gnome.org/show_bug.cgi?id=646913
2011-04-08 20:31:21 -04:00
Matthias Clasen
d69cbfd374 Document some GtkEntry functions as going away in GTK+ 3
https://bugzilla.gnome.org/show_bug.cgi?id=646773
2011-04-06 00:44:13 -04:00
Matthias Clasen
a06089a248 Document ::expose-event as deprecated
This doesn't really help that much, but better than nothing.
2011-04-05 14:58:20 -04:00
Matthias Clasen
7565bcd928 List all available icons in Makefile.am
This mismatch was causing e.g. gtk-caps-lock-warning.png to show
up as missing image in entries.

At the same time, sort the icon list alphabetically.
2011-04-01 16:44:12 -04:00
Matthias Clasen
174ad13a2f Use existing mime type for GTK_FILE stock icon
document-x-generic is not actually a mimetype. Using text-x-generic
instead lets us work out-of-the-box in a11y themes.
2011-04-01 16:44:12 -04:00
Alexander Larsson
c9c23b0728 Ensure we always grab the gdk lock in async callbacks
Async callbacks are delivered in idles, so we need to make sure
we get the gdk lock before calling any gdk/gtk stuff. This was
missing in a few places.
2011-03-28 14:00:31 +02:00
Pavel Holejsovsky
6e178a69fc [GI] Add missing (out) and (array) annotations
Backported from master commit 2fb1c064.
2011-03-16 10:45:35 +01:00
Matthias Clasen
4ddf2c6512 Use existing mime type for GTK_FILE stock icon
document-x-generic is not actually a mimetype. Using text-x-generic
instead lets us work out-of-the-box in a11y themes.
2011-03-14 10:21:54 -04:00
Matthias Clasen
9862894317 Don't use GDK_NONE when GDK_SELECTION_CLIPBOARD is meant 2011-03-14 10:18:35 -04:00
Matthias Clasen
5af547bf83 Add missing annotations
This adds missing annotations for gdk_window_get_position(),
gtk_window_get_position() and gtk_accelerator_parse().
Bug 644353, patch by Ulrik Sverdrup.
2011-03-12 21:36:18 -05:00
Tristan Van Berkom
f3cd3c3dd0 Fixed GtkTreeModel::row-deleted documentation
This documentation was in direct conflict with the documentation
of gtk_tree_model_row_deleted() docs, the function docs are TRUE,
the signal docs were FALSE, fixed.
2011-03-09 15:10:52 +09:00
Benjamin Otte
559cb5d8ab build: Fix generation of gtktypefuncs.c with -g3 in CFLAGS
With -g3, macros are included in the output, and that caused
gdk_window_get_type() to be included when it shouldn't be.
2011-03-07 17:11:26 +01:00
Sebastian Pölsterl
e229f2998b Fixed gtk_calendar_get_date annotations: Added missing (out)
Backported from master commit 34b573b07
2011-03-01 16:01:32 +01:00
Federico Mena Quintero
b6bf9112ad [GtkFileChooser] Fix initial selection when hidden files are shown
We were breaking prematurely out of the loop that goes through
each file that is pending selection; not only does that loop
disable filtering and show hidden files if needed, but it also
selects the files themselves.  So we need to walk the whole
list of files.

Signed-off-by: Federico Mena Quintero <federico@gnome.org>

https://bugzilla.gnome.org/show_bug.cgi?id=643170
2011-02-24 15:01:07 -06:00
Matthias Clasen
e158b9b13a Make GtkRecentManager use standard icon names for themed icons 2011-02-24 14:16:24 -05:00
Matthias Clasen
44b2e88aef Make gtk_combo_box_text_get_active_text() behave as documented
If there is an entry, it is supposed to return the contents
of the entry. Pointed out by Allin Cottrell,
https://bugzilla.gnome.org/show_bug.cgi?id=642681
2011-02-19 13:30:02 -05:00
Matthias Clasen
856a69936b Fix a memory leak with file chooser previews 2011-02-19 10:11:12 -05:00