Commit Graph

27853 Commits

Author SHA1 Message Date
Federico Mena Quintero
7985ab786d 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-27 18:54:42 -05:00
Federico Mena Quintero
121f787136 Update the docs with the policies for Save dialogs
Basically, don't ever set the current folder, and only use
gtk_file_chooser_set_filename() for 'File/Save As'.  This is so
that the file chooser will be able to present its recently-used
lists as appropriate, giving the user good suggestions by default.

Signed-off-by: Federico Mena Quintero <federico@gnome.org>
2011-07-01 19:12:09 -05:00
Federico Mena Quintero
9eb324dbaf 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-01 19:07:12 -05:00
Federico Mena Quintero
894be790bf 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-01 19:07:12 -05:00
Federico Mena Quintero
6bb34d7dd4 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-01 19:07:12 -05:00
Federico Mena Quintero
18ebec28c9 Create the recently-used widgets and infobar from the pathbar widgets as well
Signed-off-by: Federico Mena Quintero <federico@gnome.org>
2011-07-01 19:07:12 -05:00
Federico Mena Quintero
3b2e4623f3 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-01 19:07:12 -05:00
Federico Mena Quintero
4d9fdb1c1b 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-01 19:07:11 -05:00
Federico Mena Quintero
b442a3a4ea 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-01 19:07:11 -05:00
Federico Mena Quintero
ae42f286bb 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-01 19:07:11 -05:00
Federico Mena Quintero
1af579b1a2 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-01 19:07:11 -05:00
Federico Mena Quintero
064ff39ad7 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-01 19:07:11 -05:00
Federico Mena Quintero
b90e1211cf Put recently-used folders in the recently-used list
Signed-off-by: Federico Mena Quintero <federico@gnome.org>
2011-07-01 19:07:10 -05:00
Federico Mena Quintero
e7196ee985 Turn a struct field into a local variable
Signed-off-by: Federico Mena Quintero <federico@gnome.org>
2011-07-01 19:07:10 -05:00
Federico Mena Quintero
5564df4ac9 Remove unused struct field
Signed-off-by: Federico Mena Quintero <federico@gnome.org>
2011-07-01 19:07:10 -05:00
Federico Mena Quintero
d64c88d4d1 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-01 19:07:10 -05:00
Federico Mena Quintero
252ace6681 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-01 19:07:10 -05:00
Federico Mena Quintero
1ffd36814a 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-01 19:07:09 -05:00
Federico Mena Quintero
4353a5f88c 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-01 19:05:12 -05:00
Federico Mena Quintero
3146c790a7 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-01 19:05:12 -05:00
Federico Mena Quintero
904ad6620f 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-01 19:01:24 -05:00
Cosimo Cecchi
668790ddee toolbar: don't leak the sibling path 2011-07-01 12:33:26 -04:00
Cosimo Cecchi
34d85f04e5 toolbar: don't count invisible widgets when building the sibling path
Also, fix RTL nth-child handling for toolbars.
2011-07-01 12:31:22 -04:00
Cosimo Cecchi
9417017f5b toolbar: invalidate order when an item visibility changes 2011-07-01 12:31:22 -04:00
Matthias Clasen
e2a2da224d Test box and toolbar regions in parallel
This makes it easy to see discrepancies.
Plus, it is fun
2011-07-01 12:31:22 -04:00
Matthias Clasen
301c120b74 toolbar: nth-child support for GtkToolbar
This doesn't quite work right yet.
2011-07-01 12:31:22 -04:00
Cosimo Cecchi
ef153a5fff box: follow children visibility when building the sibling path
This fixes nth-child not working for widgets which were not
visible before being added to the box, but it's also a better fix
for https://bugzilla.gnome.org/show_bug.cgi?id=652769
2011-07-01 11:48:22 -04:00
Cosimo Cecchi
e731caf8d0 Revert "gtkbox: Invalidate order on changes, even if the child is not visible"
This reverts commit 8cb0cc58e3.
2011-07-01 11:47:41 -04:00
Matthias Clasen
c2449763ce Fix up docs for predefined style classes.
The table was incomplete and out of date. Instead, just
put a list of links in that place, and move all the extra
documentation to the macros. Bug 653785
2011-06-30 19:18:26 -04:00
Matthias Clasen
c22fb1684c GdkKeymap: Prevent an infinite loop in the non-XKB case
Somehow the increment got lost, as comparison with the 2.x code
shows.
2011-06-30 14:45:16 -04:00
Vincent Untz
8cb0cc58e3 gtkbox: Invalidate order on changes, even if the child is not visible
When we build the sibling path for the order, we do not skip hidden
children (since, quoting the comment, "we cannot reliably detect changes
in widget visibility"). So we need to invalidate the order when hidden
children are reordered and removed.

https://bugzilla.gnome.org/show_bug.cgi?id=652769
2011-06-30 09:11:28 +02:00
John (J5) Palmieri
9c4892f291 [gi] add more annotations to force drag and drop api to be methods 2011-06-29 14:54:25 -04:00
Wouter Bolsterlee
8a11ea6dcc Updated Dutch translation by Wouter Bolsterlee 2011-06-29 19:31:53 +02:00
John (J5) Palmieri
f46f038abd [gi] make sure gtk_drag_dest_unset is annotated as a method 2011-06-29 12:11:36 -04:00
Juan Pablo Ugarte
ea81c710d0 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:45:33 -03:00
Javier Jardon
445ac0e650 gtk/gtkmenuitem: Remove reference to deprecated and removed GtkItem 2011-06-29 15:01:19 +01:00
Chun-wei Fan
9eeadc2dc8 Update VS2010 READNE.txt
This file should have Windows CRLF EOL as well
2011-06-29 13:55:46 +08:00
Chun-wei Fan
f1306f7bd1 Re-attempt to correct EOL on VS2010 solution
This time I realized that I needed to set autocrlf=false on my Windows side
... ugh...

This is one of those files that must have CRLF line endings to work
correctly :|
2011-06-29 12:49:14 +08:00
Claudio Saavedra
ca801abb4c Use a PAGE_STEP macro instead of a magic number
Helps to understand the code.

https://bugzilla.gnome.org/show_bug.cgi?id=653512
2011-06-28 09:47:44 +03:00
Ihar Hrachyshka
f403a4c8aa Updated Belarusian translation. 2011-06-28 01:32:49 +03:00
Matthias Clasen
7bbe537915 Don't forget to initialize a variable
Pointed out by clang in bug 653333.
2011-06-27 16:47:59 -04:00
John (J5) Palmieri
f685ce37fc [gi] correct annotation for GtkMenuPositionFunc callbacks 2011-06-27 13:45:17 -04:00
Mike Gorse
4fa3cef795 bgo#653191 - fix uninitialized variable in gtk_file_chooser_entry.c 2011-06-27 12:36:11 -05:00
Paolo Borelli
399de11116 Speed up page insertion
Make sure to call widget_set_child_visible(false) on all tabs except the
current before calling widget_set_parent.
2011-06-26 20:41:21 +02:00
Ihar Hrachyshka
2c91626560 Updated Belarusian translation. 2011-06-25 21:32:27 +03:00
Ihar Hrachyshka
e967374fe4 Updated Belarusian translation. 2011-06-25 21:28:16 +03:00
Chun-wei Fan
c0d54cde0c Update VS projects distribution
Change the EXTRA_DIST to distribute the gtk3-demo projects (instead of
gtk-demo)
2011-06-25 02:06:53 +08:00
Chun-wei Fan
f74585caea Add headers required by gtk/gtkwin32embedwidget.c
Some functions from the added headers are needed by this file to compile
without C4013 (a.k.a implicit declaration of ...) warnings/errors
2011-06-24 13:19:58 +08:00
Chun-wei Fan
0c9d2795e3 Update VS project files
-Reinstate build/win32/vs10/gtk+.sln with the correct EOL (DOS/Windows), so
 that it will be correctly recognized by Windows instead of having the
 annoying "Unrecognized Visual Studio Version".

-Update property sheets to reflect on new headers added

-Change the demo program to be gtk3-demo.exe, to be consistent with the
 names on other platforms, and updated/renamed related project/solution
 files, and added overlay.c to the list of demo sources.
2011-06-24 12:48:22 +08:00
Chun-wei Fan
c5250adce1 Temporarily remove build/win32/vs10/gtk+.sln
The line endings need to be DOS/Windows...
2011-06-24 12:42:47 +08:00