Commit graph

72 commits

Author SHA1 Message Date
Georges Basile Stavracas Neto
e59fdcdf1c window: Replace deprecated function
gdk_keymap_get_default() is deprecated in favor of
gdk_keymap_get_for_display(), so let's just use that.
2018-03-06 22:55:01 -03:00
Bastien Nocera
10738d68c6 shell: Remember the last used panel
And restore it if the application is launched without any panels
requested.

https://bugzilla.gnome.org/show_bug.cgi?id=786607
2018-02-06 10:40:02 +01:00
Georges Basile Stavracas Neto
3632bc7dad window: Remove unnecessary wrapper functions
These were only used by CcApplication, and at this level
of the program we don't need to use any wrapper functions,
since we're certain that the CcWindow is a GtkWindow subclass.
2018-01-21 10:24:53 -02:00
Georges Basile Stavracas Neto
4f40a2fa33 window: Move remaining UI declarations to GtkBuilder file
There were leftover UI declarations in the source code, breaking
the nice split that it having the UI declared in the GtkBuilder
file while the logic is programmed.

This commit moves the remaining widgets declared in the source
code, the connected signals using and the binded properties to
the GtkBuilder file. This led to a nice cleanup in the source
code.
2018-01-21 10:24:53 -02:00
Georges Basile Stavracas Neto
a5d3af3a25 window: Reorganize functions
In an attempt to make the CcWindow code more organized and
structured, this commit reorganizes the source code to match
a recent pattern:

 * Structure declarations, G_DEFINE_TYPE
 * Function prototypes
 * Auxiliary methods
 * Callbacks
 * Vfunc overrides
 * class_init() + init()
 * Public API
2018-01-21 09:46:12 -02:00
Georges Basile Stavracas Neto
8e76f88b7b trivial: Fix style issues
Fixes a few code style inconsistencies found.
2018-01-21 09:22:08 -02:00
Georges Basile Stavracas Neto
693df19026 shell: Initialize variable
In practice, this is never uninitialized, but the
compiler is complaining anyway, so let's play the
conservative and make sure it's always initialized
to NULL.
2018-01-17 23:14:09 -02:00
Felipe Borges
aaabf05ae6 shell: Include panel "keywords" in the row data
This way GtkListBox filter functions can use the "keywords" in
order to provide accurate search results.

https://bugzilla.gnome.org/show_bug.cgi?id=790755
2017-11-28 11:04:38 +01:00
Jakub Steiner
5d32d8548c icons: ship app icon
- to move to the great new Flatpak future, Apps should rely on shiping
  their own app icons, their identity. For more context, see

  https://wiki.gnome.org/action/edit/Design/Whiteboards/CoreAppPresentation

https://bugzilla.gnome.org/show_bug.cgi?id=790070
2017-11-23 15:58:39 +01:00
Felipe Borges
cfbe34f94c window: Disable the menubar
It looks better to present the fallback app menu in the headerbar
instead.

This change assumes that client side decorations will be available,
and therefore a GtkHeaderBar.

https://bugzilla.gnome.org/show_bug.cgi?id=786692
2017-09-12 11:10:33 +02:00
Felipe Borges
357e944336 window: Split the window decorations between the header bars
When application menus are not supported by the desktop environment
or are disabled, Gtk+ makes the menu available with a fallback. For
client-side decorations the fallback consists of adding a menu
button at the begining of the titlebar. Since g-c-c has a split
headerbar, we need to explicitly handle the decoration layout.

This commit forces the "menu" to belong to the left headerbar, and
leaves the other buttons to ble placed at the right headerbar.

The "show-close-button" property has to be set in order to present
any type of decoration buttons in the header bar.

https://bugzilla.gnome.org/show_bug.cgi?id=786692
2017-09-12 11:10:33 +02:00
Georges Basile Stavracas Neto
10c9722283 window: Synchronize sidebar and header with a size group
Instead of using a callback on size-allocate, and setting
a custom size request. Using a sizegroup is much cleaner
and avoid some potential issues we could have in the future.
2017-08-16 16:47:14 -03:00
Georges Basile Stavracas Neto
b8fbf5032e window: Don't accidentally destroy panels when showing overview
When passing --overview, Settings' new shell window accidentally
removes the newly selected panel.

We're considering the possibility of adding an overview page but,
since that won't happen for the next release, let's just make sure
something happens for now.

Fix that by simply changing the panel list view, which selects the
Wi-Fi panel if the user was in another view.

https://bugzilla.gnome.org/show_bug.cgi?id=786117
2017-08-16 16:35:07 -03:00
Georges Basile Stavracas Neto
d5c4436869 project: Switch to the new shell
This is the bomb dropping commit. It does so simply by
changing the compiled files, and adjusting the build
projects proper.
2017-08-09 19:31:41 +02:00
Bastien Nocera
09263321d4 shell: Close overview on Ctrl+W as well
https://bugzilla.gnome.org/show_bug.cgi?id=776385
2017-01-03 12:04:03 +01:00
Carlos Garnacho
3fa5526d91 shell: Make CcWindow use custom title widget (if any)
If the current panel requests setting a custom widget, honor that
and place those in the headerbar.
2016-11-04 23:26:41 +01:00
Georges Basile Stavracas Neto
71d39a4836 window: turn into a final class
This commit updates the code to use the recently
introduced API. The new functions improve the
legibility and maintainability of the code, and
makes it easier to work on new features.

https://bugzilla.gnome.org/show_bug.cgi?id=766922
2016-06-03 12:32:36 -03:00
Bastien Nocera
22e463a4ce shell: Avoid whitespace at the bottom in small mode
When using the small mode, and the scroll window's content
height is smaller than the screen, we'd end up with whitespace at the
bottom of the panel, as the panel's height is smaller than the window.
2016-03-01 16:15:41 +01:00
Bastien Nocera
3ff7c61db1 shell: Fix gtk_tree_model_get_iter_first() retval
https://bugzilla.gnome.org/show_bug.cgi?id=749892
2015-05-27 11:06:02 +02:00
Matthias Clasen
fabb18fb1d Make HighContrast icons work
We need to make the cell renderers follow state for the
recoloring of icons on selection to work.

https://bugzilla.gnome.org/show_bug.cgi?id=745873
2015-03-08 22:24:10 -04:00
Rui Matos
52c27cd672 shell: Drop deprecated API usage
https://bugzilla.gnome.org/show_bug.cgi?id=740986
2015-01-06 16:17:36 +01:00
Rui Matos
d93c51f228 shell: Unset sort terms when search entry is programatically cleared
Otherwise items would keep the previous search sort order when going
back to the overview.
2014-12-02 18:52:00 +01:00
Michael Catanzaro
4ad8e2e85e shell: Use correct window icon
The window icon should match the icon specified in the desktop file.

https://bugzilla.gnome.org/show_bug.cgi?id=724937
2014-07-18 18:28:36 +02:00
Yosef Or Boczko
bc7fddb01e shell: Use the new support for RTL icons in GtkIconTheme
https://bugzilla.gnome.org/show_bug.cgi?id=730597
2014-05-23 12:31:25 +03:00
Rui Matos
13abc75273 shell: Make search results sorting smarter
Instead of just sorting by the name the sort order will now be:

1. Panels whose name match a search term
2. Panels whose keywords match the most search terms
3. Panels whose description match the most search terms
4. The remaining panels by name

https://bugzilla.gnome.org/show_bug.cgi?id=729027
2014-05-16 11:59:48 +02:00
Rui Matos
98a2ab2603 shell: Keep the filter terms cached
This avoids calling g_strsplit() for every model item when filtering.

https://bugzilla.gnome.org/show_bug.cgi?id=729027
2014-05-16 11:59:48 +02:00
Bastien Nocera
4700b6f61e shell: Disable type-ahead in search window
And force Ctrl+F to be disabled as well, by unsetting the
search column after setting the model.

https://bugzilla.gnome.org/show_bug.cgi?id=722296
2014-01-16 12:37:20 +01:00
Yosef Or Boczko
c50b63cd78 shell: Fix headerbar item positions
https://bugzilla.gnome.org/show_bug.cgi?id=721830
2014-01-09 12:43:10 +02:00
Yosef Or Boczko
3ab34035a5 shell: Use margin-start/end instead of margin-left/right
https://bugzilla.gnome.org/show_bug.cgi?id=712661
2013-11-19 22:34:52 +02:00
Yosef Or Boczko
11a074525c shell: Align better the buttons in the headerbar
https://bugzilla.gnome.org/show_bug.cgi?id=708000

Signed-off-by: Yosef Or Boczko <yoseforb@gmail.com>
2013-09-27 12:15:25 +03:00
Rui Matos
be35af45c9 shell: Make sure we don't start with a selected icon
If focus ends up in the icon view we get an ugly selection so avoid
that at least initially.
2013-09-04 01:31:38 +02:00
Rui Matos
04b24631ab Revert "shell: Make sure we don't focus the icon view when starting"
This reverts commit 8e0f4e7be0 - there's
a better fix in the next commit.
2013-09-04 01:31:37 +02:00
Rui Matos
8e0f4e7be0 shell: Make sure we don't focus the icon view when starting
If focus ends up in the icon view we get an ugly selection so avoid
that at least initially.
2013-09-03 19:52:46 +02:00
Bastien Nocera
7bfc2f64f4 shell: Avoid width changes when searching
In some locales, the description will be too long, so
ellipsise it to avoid the window changing width.

https://bugzilla.gnome.org/show_bug.cgi?id=706626
2013-08-28 12:32:54 -04:00
Yosef Or Boczko
c713b4f972 shell: Fix stretched header bar lock button 2013-08-21 20:42:09 +03:00
Rui Matos
c1f2787c10 shell: Don't start search while on regular panels
... either by just typing or pressing ctrl+F or ctrl+S.

https://bugzilla.gnome.org/show_bug.cgi?id=706268
2013-08-20 13:06:14 +01:00
Bastien Nocera
c0fc740e15 shell: Remove setting invisible characters on entry
It's completely unused
2013-08-20 00:35:30 +02:00
Bastien Nocera
8c7efd538b shell: Start search when typing
https://bugzilla.gnome.org/show_bug.cgi?id=706268
2013-08-20 00:35:30 +02:00
Bastien Nocera
65c0b26888 shell: Use GDK_EVENT_* macros
Instead of TRUE/FALSE

https://bugzilla.gnome.org/show_bug.cgi?id=706268
2013-08-20 00:35:30 +02:00
Yosef Or Boczko
ef995c0728 shell: Use a search bar for the search entry
https://bugzilla.gnome.org/show_bug.cgi?id=704217
2013-08-18 23:20:34 +03:00
Yosef Or Boczko
9de9364ba5 shell: Set the headerbar as our titlebar and add a close button
- set "All Settings" as title of the headerbar
  (in the overview page)
- set the name of the each panel as title of the headerbar
- remove "hide-titlebar-when-maximizes" property
- add separator and close button to the headerbar
  (set "show-close-button" property as true)

https://bugzilla.gnome.org/show_bug.cgi?id=704217
2013-08-18 23:20:34 +03:00
Thomas Wood
eca503bcc5 shell: prevent a warning if the monitor number is not available yet
https://bugzilla.gnome.org/show_bug.cgi?id=705297
2013-08-02 16:35:26 +01:00
Thomas Wood
b52fde3fcc shell: prevent the window from being taller than the height of the monitor
https://bugzilla.gnome.org/show_bug.cgi?id=705297
2013-08-01 16:23:53 +01:00
Bastien Nocera
7c579838de shell: Use new delayed search entry API
https://bugzilla.gnome.org/show_bug.cgi?id=705151
2013-07-30 16:57:31 +02:00
Yosef Or Boczko
48789d617e shell: Use GtkButton instead GdHeaderButton
remove header-bar from LIBGD_INIT in configure.ac

https://bugzilla.gnome.org/show_bug.cgi?id=704170
2013-07-19 17:30:28 +03:00
Yosef Or Boczko
79d2fc73a3 shell: Fix the look of lock button
https://bugzilla.gnome.org/show_bug.cgi?id=703769
2013-07-12 11:17:55 +03:00
Thomas Wood
da4b2f0a89 shell: ensure a search is in progress before activating a panel
https://bugzilla.gnome.org/show_bug.cgi?id=702469
2013-06-19 10:14:02 +01:00
Xavier Claessens
2f2c29ebff Shell: Go back to overview when setting panel to NULL
This is what cc_shell_set_active_panel()'s doc says it
is supposed to do.

https://bugzilla.gnome.org/show_bug.cgi?id=701929
2013-06-14 11:51:47 +02:00
Matthias Clasen
034b37d1a2 shell: Fix build 2013-06-05 17:35:25 +02:00
Owen W. Taylor
658ebff612 shell: Raise the existing window when already opened
https://bugzilla.gnome.org/show_bug.cgi?id=692259
2013-06-05 16:29:43 +02:00