Commit Graph

94 Commits

Author SHA1 Message Date
Matthias Clasen
18e0eaa9d6 tests: Stop using gtk_widget_show/hide 2022-12-13 13:46:02 -05:00
Matthias Clasen
66b062a976 Deprecate GtkMessageDialog
It is getting replaced by GtkAlertDialog

This commit only moves the header to deprecated/,
and keeps the implementation in gtk/, since it will
eventually be salvaged into a private, dialog-free
widget.
2022-10-29 13:31:41 -04:00
Timm Bäder
958e4be86d testfilechooser: Stop listening to ::selection-changed
Doesn't exist anymore.
2020-10-14 15:06:12 -04:00
Benjamin Otte
d7266b25ba Replace "gint" with "int" 2020-07-25 00:47:36 +02:00
Matthias Clasen
e31bacf7be filechooser: Drop the ::current-folder-changed signal
This signal does not work on native file choosers,
and it exposes internals of the widget that should
not be public. And it is just not very interesting.
2020-07-09 01:48:33 -04:00
Matthias Clasen
89bf8af878 filechooser: Make get_files return a list model
Like the other list getters in this interface,
make gtk_file_chooser_get_files() return a
list model.
2020-07-09 01:29:20 -04:00
Matthias Clasen
73dcda460f tests: Stop using file chooser apis that are going away
gtk_file_chooser_[un]select_all are going away, stop
using them.
2020-07-09 00:50:03 -04:00
Matthias Clasen
644d522d19 filefilter: Drop custom filters
These don't work with native file choosers.
2020-07-05 14:34:33 -04:00
Matthias Clasen
a8b0125da1 filefilter: Drop GtkFileFilterInfo
We can just make the filter operate on GFileInfo.
This is in preparation for making GtkFileFilter a
GtkFilter.

Update all users.
2020-07-05 13:55:42 -04:00
Matthias Clasen
acccac516e filefiler: No more floating
Make GtkFileFilter not be initially unowned anymore.
This is in preparation for deriving GtkFileFilter
from GtkFilter. Update all callers.
2020-07-05 12:36:47 -04:00
Emmanuele Bassi
2090dbb27d tests: Remove gtk_dialog_run()
Either use the "response" signal for dialogs that are already modal, or
use an explicit nested loop for tests that rely on the response id being
available in sequence.
2020-05-12 13:45:15 +01:00
Matthias Clasen
2a24b8c653 Replace most remaining uses of container api
These are all on GtkBox or enumerating children.
2020-05-11 22:38:21 -04:00
Matthias Clasen
cd0081d08a Use gtk_window_destroy
Replace calls to gtk_widget_destroy on windows
with gtk_window_destroy.
2020-05-11 12:20:57 -04:00
Alexander Mikhaylenko
b2f2b3f169 tests: Fix testfilechooser test
Don't use GtkContainer API on GtkWindow.
2020-05-11 04:47:26 +05:00
Timm Bäder
d1cd6aacba tests: Add common_cflags to build
And fix all the errors and warnings resulting from that

See #2491
2020-03-06 18:21:58 +01:00
Emmanuele Bassi
ff6772fd98 Remove preview widget from GtkFileChooser
The preview widget harks from a platform before time, when we didn't
have GIO, or a thumbnail specification.

Very few applications use it correctly, if at all; it has an horrid hack
to deal with the ownership of the widget's instance when accessed
through the getter function; it messes up the layout of the widget and
its label is less than useful when it comes to file names longer than a
dozen characters; it's a poor substitute for a proper thumbnail view.
2020-02-22 16:39:01 +00:00
Emmanuele Bassi
4a3742979d Remove GTK_FILE_CHOOSER_ACTION_CREATE_FOLDER
We don't need a whole separate action, now that the file chooser widget
can create folders; we can create use SELECT_FOLDER and create one.
2020-02-22 15:22:06 +00:00
Emmanuele Bassi
b09e7df81b Remove GtkFileChooser:local-only
Now that the whole API goes through GFile we don't have the weird split
between local-only and non-local-only modes.
2020-02-22 15:22:06 +00:00
Emmanuele Bassi
063ad28b1a Remove overwrite confirmation machinery from GtkFileChooser
Overwrite confirmation should not be optional, and it should not loop
into application code to create their own dialog and user response.
2020-02-22 15:22:06 +00:00
Emmanuele Bassi
5f070ff233 Remove filename/URI API from GtkFileChooser
GtkFileChooser's API predates GIO by a few years, so it started off with
filenames and URI as character arrays. After introducing GIO as a
dependency, the API included GFile-based entry points.

It's much more appropriate to use GFile everywhere, as we want to
encourage people to use GIO instead of passing random bytes to low level
POSIX API.

See: #2455
2020-02-22 15:22:06 +00:00
Benjamin Otte
a278edab22 window: Remove type argument from gtk_window_new() 2020-02-14 21:18:49 +01:00
Matthias Clasen
a6c5466900 Stop using gtk_main and gtk_main_quit
Replace these calls with direct use of GMainContext api.
2020-02-09 23:12:32 -05:00
Matthias Clasen
29e1dac1ff testfilechooser: Test the choice apis 2019-12-25 09:47:22 -05:00
Matthias Clasen
7447abb52b Stop using gtk_widget_get_toplevel
All uses of it can be replaced by gtk_widget_get_root.
2019-05-28 20:25:16 +00:00
Matthias Clasen
5120748981 Drop GtkButtonBox
This widget does not seem worth keeping,
and we want to get rid of child properties.
2019-02-04 12:44:55 -05:00
Timm Bäder
bd71e744d2 Stop using gtk_box_pack_end
It might soon go away!
2019-01-23 19:30:46 -05:00
Timm Bäder
ea897c6df4 Remove gtk_widget_show_all 2017-01-20 21:37:04 +01:00
Matthias Clasen
2c7e567f05 Update callers
Adapt all our tests and examples to the new initialization api.
2017-01-19 13:50:17 -05:00
Matthias Clasen
c514d1dd5e testfilechooser: Say Save
Thats a more typical affirmative action in save mode.
2015-07-31 07:12:35 -04:00
Benjamin Otte
974c60a0d5 tests: Fix gcc complaints about testfilechooser 2015-07-16 06:37:32 +02:00
Matthias Clasen
4a21c129e4 testfilechooser: Add a --local-only flag
This allows for easier testing of !local-only mode.
2015-07-04 00:29:26 -04:00
Matthias Clasen
f87f43b622 testfilechooser: Disable the terrible preview
It makes testing the intended user experience harder.
2015-07-04 00:29:25 -04:00
Matthias Clasen
cd033e6f07 testfilechooser: Improve filter setup
It is not ideal when the default filter filters away
all files, so change things to select the 'all files'
filter by default.
2015-04-05 22:09:22 -04:00
Matthias Clasen
0b0c6a6477 testfilechooser: Test the preview again
There is code in there to show a preview, use it.
2014-10-19 20:03:58 -04:00
Matthias Clasen
39ccbe6549 tests: Drop manual property editor
No need for this anymore, now that we have the inspector everywhere.
2014-05-22 08:32:48 -04:00
Matthias Clasen
f911d17e56 Test duplicate shortcuts
Add an application shortcut for the Music folder in testfilechooser.
The file chooser used to filter duplicates out, but this broke
in the sidebar merge.
2013-11-09 19:00:17 -05:00
William Jon McCann
fc71cbe5a6 Remove most of the stock API usage from the tests
With the exception of GtkActions and the tests for stock items.
2013-06-24 19:53:08 -04:00
Federico Mena Quintero
8d47410426 filechooser: In testfilechooser, be strict about the --action option
It would default to GTK_FILE_CHOOSER_ACTION_OPEN if the user's specified --action could not be
parsed.  I can never remember what the right options are, so make the program bail out
if the user specifies an unrecognized option.

Signed-off-by: Federico Mena Quintero <federico@gnome.org>
2013-06-21 10:41:39 -05:00
Federico Mena Quintero
8b1c918867 filechooser: In testfilechooser, add buttons to get the selection and the current name 2013-06-19 13:37:40 -05:00
Matthias Clasen
7bfcb065df Test folder filtering
Add a filter to testfilechooser that can demonstrate folder
filtering on common directories, such as Documents or Downloads.
2012-07-15 00:41:49 -04:00
Javier Jardón
9d0febc9a6 Change FSF Address 2012-02-27 17:06:11 +00:00
Javier Jardón
32ef28bc85 Replace gtk_misc_set_padding() with GtkWidget:margin properties
https://bugzilla.gnome.org/show_bug.cgi?id=651605
2011-06-02 18:49:54 +02:00
Matthias Clasen
d05d924516 Silence more compiler warnings 2011-02-12 08:01:51 -05:00
Michael Natterer
260ccdfebe gtk: remove "gboolean homogeneous" from gtk_box_new()
Because it's FALSE in virtually all use cases.
2010-11-02 12:04:35 +09:00
Javier Jardón
c15ef6405c Use gtk_box_new() instead gtk_[v|h]box_new() 2010-10-30 17:37:03 +09:00
Javier Jardón
2615ebf37e Use gtk_button_box_new() instead gtk_[v|h]_button_box_new() 2010-10-30 17:37:02 +09:00
Matthias Clasen
f53ad33994 Remove GtkObject completely 2010-09-26 22:18:19 -04:00
Benjamin Otte
c85f91e14c tests: Remove ability to set backend from testfilechooser
There's no backends anymore
2010-09-26 15:11:35 +02:00
Federico Mena Quintero
bb362f754a Add an --initial-folder option to testfilechooser.c
Signed-off-by: Federico Mena Quintero <federico@novell.com>
2009-06-12 14:09:47 -05:00
Federico Mena Quintero
c98ebe3165 Add an --initial-filename option to testfilechooser.c
We can use this to test bugs that happen when setting a filename before the
file chooser is shown, as in bgo#161670

Signed-off-by: Federico Mena Quintero <federico@novell.com>
2009-06-12 14:02:37 -05:00