Commit Graph

20959 Commits

Author SHA1 Message Date
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
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
Andika Triwidada
dde74089f4 Revert "Updated Indonesian translation"
This reverts commit 37230e5cc9.
Commit to wrong branch, should have been to master
2011-08-18 16:27:19 +07:00
Andika Triwidada
37230e5cc9 Updated Indonesian translation 2011-08-18 15:14:04 +07: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
John Ralls
a2a85a194c Bug 655122: Lion crashes during resize.
Move resizing detection to a separate function and detect resizes so that they don't result in grabs (which was causing the crash).
2011-08-13 14:11:29 -07:00
John Ralls
9edc6ca045 Bug 655122: Detect OSX version for handling version-dependent special cases (the one in question is resizing, which OSX 10.7 allows on all edges instead of the lower-right corner as on previous versions) 2011-08-13 13:55:08 -07:00
John Ralls
a90d9da9e9 Bug 655087: Prevent drqwing when there are no rectangles in which to draw. 2011-08-13 13:20:22 -07:00
Kristian Rietveld
468deb67d5 quartz: Remove MAC_OS_X_VERSION_MIN_ALLOWED ifdef
I tried to suppress compiler warnings on pre-10.6 machines this way,
but it defeats its purpose when you compile for pre-10.6 machines on
a 10.6 machine.  For now, we have to live with the warnings when
compiling on/for pre-10.6 machines, there does not seem an easy and proper
way to suppress the warnings.
2011-08-12 23:22:03 -07:00
Benjamin Berg
f0726904cb Fix polling for new data in cups print backend (bug #599664) 2011-08-06 10:40:36 +02: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
Michael Hutchinson
5c73ebf54c Bug 655074 - Fix crash with undecorated windows on MacOS Lion 2011-07-25 09:21:09 -04: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
Mario Blättermann
3822a334c5 [l10n] Updated German translation 2011-07-13 20:18:14 +02:00
Daniel Mustieles
f9e77d7320 Updated Spanish translation 2011-07-13 10:48:17 +02:00
Piotr Drąg
d14d18e371 Updated Polish translation 2011-07-13 08:44:11 +02: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