Commit graph

451 commits

Author SHA1 Message Date
Georges Basile Stavracas Neto
57ba49a137 window: reimplement search
We previously had a dedicate view for handling search,
based on model filtering and a custom panel to display
that differently.

After moving to GtkListBox, search can be trivially
done by using a filtering function, and widgets can
be fine-tuned to display extra information.

This patch, then, reimplements the search using a filtering
function over the panels' list.

https://bugzilla.gnome.org/show_bug.cgi?id=766922
2016-06-03 12:32:37 -03:00
Georges Basile Stavracas Neto
b6ab2a4922 window: use a listbox
The latest mockups use a list instead of icon grid. This
commit, after all the work porting the current UI to use
a side list, replacing the temporary icon grid.

https://bugzilla.gnome.org/show_bug.cgi?id=766922
2016-06-03 12:32:37 -03:00
Georges Basile Stavracas Neto
9d06a0f858 window: add a placeholder view
https://bugzilla.gnome.org/show_bug.cgi?id=766922
2016-06-03 12:32:37 -03:00
Georges Basile Stavracas Neto
2590e38905 window: set the default width and height
Since the window can shrink down too much, it makes
sense for us to have a sane default width and height.

720x480 was chosen because that's the default resolution
for CRT TVs.

https://bugzilla.gnome.org/show_bug.cgi?id=766922
2016-06-03 12:32:36 -03:00
Georges Basile Stavracas Neto
a267ebd9a2 window: make the sidelist and first headerbar horizontally equal
The first headerbar and the sidelist should stay synchronized,
and this commit does so by setting the width request of the
headerbar to the allocated width of the sidelist.

https://bugzilla.gnome.org/show_bug.cgi?id=766922
2016-06-03 12:32:36 -03:00
Georges Basile Stavracas Neto
c0bdc06d1e window: introduce the second headerbar
This commit introduces the second headerbar, where the
panel title and the panel widgets are displayed. It also
adapts the code to use the second headerbar when needed.

https://bugzilla.gnome.org/show_bug.cgi?id=766922
2016-06-03 12:32:36 -03:00
Georges Basile Stavracas Neto
fa1a6b3457 window: pack the headerbar inside a box
In the future commits, we'll use two headerbars to visually
separate the panel area and the sidelist.

https://bugzilla.gnome.org/show_bug.cgi?id=766922
2016-06-03 12:32:36 -03:00
Georges Basile Stavracas Neto
df086d4db9 window: put the search button in the start of the headerbar
Since the search bar has been moved to above the sidelist, it
makes sense to have the search button on the start of the
headerbar, strengthening the relation between both widgets.

https://bugzilla.gnome.org/show_bug.cgi?id=766922
2016-06-03 12:32:36 -03:00
Georges Basile Stavracas Neto
55cc4c3a91 window: make it a template class
In order to prepare ourselves for the future changes,
having the window as a template class is hugely advantageous
for we'll be able to modify the interface much more
quickly and cleanly.

This commit makes the window a template class, and only
that. No behavioral changes, nor new features were
introduced here.

https://bugzilla.gnome.org/show_bug.cgi?id=766922
2016-06-03 12:32:36 -03:00
Georges Basile Stavracas Neto
6f38ca83c8 window: remove the small screen code
Because the old layout was never meant to scale well on low
resolution displays, we had to introduce code that adapts the
window to be usable on low res screens.

The problem with this code is that it still doesn't scale down
very well for really low resolution screens. Partially because
of the layout itself (which, again, was never meant to), partially
because the panels request a size bigger than e.g. 720x480. Now,
this is an important feature and we need to support that low
resolution by default.

To push this constraint forward, remove the code that managed a
custom mode for low resolution screens. From now on, the Control
Center shall be adapted to scale well on any screen sizes.

https://bugzilla.gnome.org/show_bug.cgi?id=766922
2016-06-03 12:32:36 -03:00
Georges Basile Stavracas Neto
77ef6c4bbd window: remove the fixed width request code
Having a fixed width is bad for various reasons. First, it's
harder to deal with low resolution screens, which was fixed
by adding an entire new mode just to deal with it. Second,
because it may not scale well for big resolutions.

Fix that by removing the code that handles the fixed width.
The next commit will completely remove the code that manages
small screens, in the hope that the new layout will handle
both cases well by design.

https://bugzilla.gnome.org/show_bug.cgi?id=766922
2016-06-03 12:32:36 -03:00
Georges Basile Stavracas Neto
2f844e2a6a window: make the panels' stack expand
This way, panels can fill the most of the screen, which
is the desired behavior proposed by the mockups.

https://bugzilla.gnome.org/show_bug.cgi?id=766922
2016-06-03 12:32:36 -03:00
Georges Basile Stavracas Neto
c47bc08b06 window: separate the panel selector
To progressively achieve the sidelist, let's start by moving
the current iconview selector to the side and then turning
it into a GtkListBox.

This commit, then, moves the iconviews' list to the start of
the horizontal box added in the previous commit.

https://bugzilla.gnome.org/show_bug.cgi?id=766922
2016-06-03 12:32:36 -03:00
Georges Basile Stavracas Neto
c006198434 window: add a horizontal box before the stack
The horizontal box will be used in the future commits
to separate the sidelist from the stack.

https://bugzilla.gnome.org/show_bug.cgi?id=766922
2016-06-03 12:32:36 -03:00
Georges Basile Stavracas Neto
2bb6d441a7 build: create another executable for the new layout
This way, we can test both layouts in parallel and, in
case something goes wrong, we always have to old layout
as a fallback.

https://bugzilla.gnome.org/show_bug.cgi?id=766922
2016-06-03 12:32:36 -03:00
Georges Basile Stavracas Neto
fe3a23702f build: copy CcWindow in alt/ directory
The copied files are exact copies of shell/cc-window.c and
shell/cc-window.h, and they'll be used to implement the restyled
shell as an alternative binary.

https://bugzilla.gnome.org/show_bug.cgi?id=766922
2016-06-03 12:32:36 -03: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
Cosimo Cecchi
af6b9b6402 editable-entry: use floats to avoid warning
Or the code in g_object_set_valist() may treat the zero as a NULL, and
trigger a warning.

https://bugzilla.gnome.org/show_bug.cgi?id=764296
2016-04-14 12:31:49 -07: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
Piotr Drąg
e9d65002a9 Add context to strings in the shortcut window 2016-02-01 19:07:16 +01:00
Richard Hughes
3badc6945a Add a missing tag to the AppData file 2016-01-25 16:05:00 +00:00
Matthias Clasen
fde96cc691 shell: Add a help overlay
This explains the various keyboard shortcuts that are available
in the control-center.

See https://wiki.gnome.org/Initiatives/GnomeGoals/ShortcutWindows

https://bugzilla.gnome.org/show_bug.cgi?id=759320
2015-12-10 20:51:28 -05:00
Richard Hughes
d620a71422 shell: Manually add kudos to the AppData file 2015-11-27 14:34:28 +00:00
Christophe Fergeau
3b5e7e1805 shell: Fix leak in cc_shell_item_view_update_cells
==11430== 48 (24 direct, 24 indirect) bytes in 1 blocks are definitely lost in loss record 10,663 of 18,7
==11430==    at 0x4A06C50: malloc (in /usr/lib64/valgrind/vgpreload_memcheck-amd64-linux.so)
==11430==    by 0x7F260AC: g_malloc (gmem.c:97)
==11430==    by 0x7F3F0F7: g_slice_alloc (gslice.c:1007)
==11430==    by 0x7F19BE5: g_list_prepend (glist.c:311)
==11430==    by 0x684843B: accum_cells (gtkcellarea.c:1563)
==11430==    by 0x6850989: gtk_cell_area_box_foreach (gtkcellareabox.c:1145)
==11430==    by 0x6848AAA: gtk_cell_area_foreach (gtkcellarea.c:1730)
==11430==    by 0x6848490: gtk_cell_area_get_cells (gtkcellarea.c:1573)
==11430==    by 0x6857339: gtk_cell_layout_get_cells (gtkcelllayout.c:592)
==11430==    by 0x685668F: gtk_cell_layout_default_get_cells (gtkcelllayout.c:342)
==11430==    by 0x6857339: gtk_cell_layout_get_cells (gtkcelllayout.c:592)
==11430==    by 0x45242B: cc_shell_item_view_update_cells (cc-shell-item-view.c:116)
==11430==    by 0x451DDD: cc_shell_category_view_constructed (cc-shell-category-view.c:141)
==11430==    by 0x7C8DC10: g_object_new_internal (gobject.c:1814)
==11430==    by 0x7C8E71A: g_object_new_valist (gobject.c:2033)
==11430==    by 0x7C8D6C5: g_object_new (gobject.c:1617)
==11430==    by 0x4520AB: cc_shell_category_view_new (cc-shell-category-view.c:213)
==11430==    by 0x44F5D2: add_category_view (cc-window.c:852)
==11430==    by 0x44F78B: setup_model (cc-window.c:880)
==11430==    by 0x450EBC: create_main_page (cc-window.c:1460)
==11430==    by 0x4514F1: create_window (cc-window.c:1553)
==11430==    by 0x45170A: cc_window_init (cc-window.c:1587)
==11430==    by 0x7CA6E7D: g_type_create_instance (gtype.c:1870)
==11430==    by 0x7C8DAC5: g_object_new_internal (gobject.c:1774)
==11430==    by 0x7C8E71A: g_object_new_valist (gobject.c:2033)
==11430==    by 0x7C8D6C5: g_object_new (gobject.c:1617)
==11430==    by 0x451847: cc_window_new (cc-window.c:1602)
==11430==    by 0x44D409: cc_application_startup (cc-application.c:262)
==11430==    by 0x7C8827D: g_cclosure_marshal_VOID__VOIDv (gmarshal.c:905)
==11430==    by 0x7C8590F: g_type_class_meta_marshalv (gclosure.c:1021)
==11430==    by 0x7C854D1: _g_closure_invoke_va (gclosure.c:864)
==11430==    by 0x7CA0771: g_signal_emit_valist (gsignal.c:3246)
==11430==    by 0x7CA18E9: g_signal_emit (gsignal.c:3393)
==11430==    by 0x7982671: g_application_register (gapplication.c:2015)
==11430==    by 0x79808D2: g_application_real_local_command_line (gapplication.c:983)
==11430==    by 0x68143D6: gtk_application_local_command_line (gtkapplication.c:638)
==11430==    by 0x7982D4D: g_application_run (gapplication.c:2280)
==11430==    by 0x44C96B: main (main.c:57)

https://bugzilla.gnome.org/show_bug.cgi?id=756762
2015-10-19 11:19:17 +02:00
Christophe Fergeau
3717e985eb shell: Don't call gtk_clutter_init() when using cheese
cheese_gtk_init() is called as well and will be taking care of that for
us.

https://bugzilla.gnome.org/show_bug.cgi?id=751597
2015-07-16 11:51:07 +02:00
Christophe Fergeau
a70172cfea shell: Move cheese_gtk_init() call earlier
Now that we handle local command line arguments, the 'command_line'
vfunc can no longer get the initial argc/argv passed to the process.
Now, cheese_gtk_init() is called unconditionally from main()
where argc/argv are available.

https://bugzilla.gnome.org/show_bug.cgi?id=751597
2015-07-16 11:51:07 +02:00
Christophe Fergeau
3f586c4a95 shell: Handle --version as a regular argument
It was handled through a callback calling exit(). Now that we have a
handle-local-options callback, we can handle it as a regular argument
from there.

https://bugzilla.gnome.org/show_bug.cgi?id=751597
2015-07-16 11:51:07 +02:00
Christophe Fergeau
b484470e56 shell: Handle --list from the local instance
This is an help-like parameter, so we want its output to show up in the
terminal from which gnome-control-center was just started, not from the
terminal from which the main gnome-control-center instance was started.

https://bugzilla.gnome.org/show_bug.cgi?id=751597
2015-07-16 11:51:06 +02:00
Christophe Fergeau
b3138a4c0f shell: Connect to "handle-local-options" signal
https://bugzilla.gnome.org/show_bug.cgi?id=751597
2015-07-16 11:50:48 +02:00
Christophe Fergeau
e8485dea69 shell: Parse command line args into a GVariantDict
Since we are using g_application_add_main_option, we can remove the
global variable used to parse the arguments into, and get the parsed
arguments from the GVariantDict returned by
g_application_command_line_get_options_dict().
This is in preparation for handling some command line options in the
local gnome-control-center instance, and others in the remote instance.

https://bugzilla.gnome.org/show_bug.cgi?id=751597
2015-07-16 11:49:40 +02:00
Christophe Fergeau
750bb5158d shell: Use g_application_add_main_option_entries
Since GApplication provides this API, we can as well use it, this will
be useful in order to correctly split option handling between the local
instance and the main instance.

https://bugzilla.gnome.org/show_bug.cgi?id=751597
2015-07-16 11:49:40 +02:00
Christophe Fergeau
0db5500232 shell: Don't handle --help ourselves
GOption can handle --help for us, so we don't need to reimplement this
ourselves. This causes a small regression as starting a main
gnome-control-center instance and then running gnome-control-center
--help will cause the main instance-control-center to exit. This will be
fixed in the following patches, and this fixes the opposite bug:
if gnome-control-center is not running, gnome-control-center --help
would not exit after displaying the help before this commit.

https://bugzilla.gnome.org/show_bug.cgi?id=751597
2015-07-16 11:49:40 +02:00
Christophe Fergeau
c33ac8bca9 shell: Fix GVariantBuilder leak
When a GVariantBuilder is created with g_variant_builder_new(), it must
be unref'ed with g_variant_builder_unref() when no longer needed. In
this case, we can just use a local stack-allocated GVariantBuilder to
avoid the leak.

https://bugzilla.gnome.org/show_bug.cgi?id=751597
2015-07-16 11:49:40 +02:00
Christophe Fergeau
c84722248e shell: Revert "Let panels have their own commandline flags"
This reverts commit 31a8a99440.

This was meant for bgo#695885 which has stalled for a while, so this
feature has no in-tree user. This commit removes it for now, this can be
readded when users for it materialize.

https://bugzilla.gnome.org/show_bug.cgi?id=751597
2015-07-16 11:49:34 +02: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
Richard Hughes
daed241f9a Add a simple AppData file
This is needed for three reasons:

 * To be able to arrange the icon into a folder in GNOME Software
 * So that we do not allow the application to be removed
 * To show the update description not in the 'OS Updates' package section
2015-04-01 10:47:55 +01: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
Michael Catanzaro
14356d652b Revert "main: Disable SSLv3 because of POODLE"
This reverts commit 38e7ea475a.

Now that gnome-online-accounts uses WebKit2, we should not presume to
know more about TLS security than WebKit. In WebKit1 this was our
responsibility.

https://bugzilla.gnome.org/show_bug.cgi?id=745645
2015-03-05 10:15:35 -06:00
Timm Bäder
fe77d8020a list-box-helper: Unset row header if unneeded
The usual implementation of the header func adds headers to all rows but
the first one. If the first row then gets removed, the second row
becomes the first and keeps its header, since nothing ever removes it.
Fix this by also removing the header if we are looking at the first row.

https://bugzilla.gnome.org/show_bug.cgi?id=743441
2015-01-28 12:15:10 +01:00
Ondrej Holy
a4521c15d5 user-accounts: update padding on style-updated
Padding is updated for some widgets once, when creating the widgets.
But it seems style may not be loaded yet. Therefore the padding has
to be updated on "style-updated" signal to reflect style changes.

https://bugzilla.gnome.org/show_bug.cgi?id=743180
2015-01-27 16:35:48 +01:00
Carlos Garnacho
be8d68c591 Update device configuration from gnome-settings-daemon
GsdWacomDevice has been updated, dragging GsdDeviceManager as a dependency
from g-s-d, which has been added to panels/common, and compiled as a
separate static libary, which is used by the wacom and mouse modules.

gsd-input-helper.[ch] is now in such library and has been removed from
the panel directories.

https://bugzilla.gnome.org/show_bug.cgi?id=743196
2015-01-20 20:44:13 +01:00
Rui Matos
1df796ac28 printers: Drop remaining deprecated API usage
https://bugzilla.gnome.org/show_bug.cgi?id=740986
2015-01-08 19:04:53 +01: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
Ondrej Holy
bd5ac1078d cc-editable-entry: don't use deprecated xalign on GtkButton 2014-11-20 11:32:33 +01:00
Debarshi Ray
38e7ea475a main: Disable SSLv3 because of POODLE
Since GOA is still using WebKit1, we need to set the environment
variable ourself. We can stop setting it once we port to WebKit2
because the network process will handle it for us.

https://bugzilla.gnome.org/show_bug.cgi?id=739960
2014-11-11 15:12:18 +01:00
Ondrej Holy
192888fea4 cc-editable-entry: avoid using deprecated GtkAlignment and GtkMisc
https://bugzilla.gnome.org/show_bug.cgi?id=736013
2014-10-31 08:53:24 +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
Bastien Nocera
f528de73aa shell: Make list box max height configurable
So that the Media sharing dialogue in the Sharing panel isn't too high.
2014-06-26 16:00:45 +02:00
Bastien Nocera
588928a946 shell: Add support for mixed height list boxes in helper
This fixes problems with the networks list boxes in the sharing panel
which have mixed heights.
2014-06-26 16:00:45 +02:00