After an evaluation, GNOME has moved from Bugzilla to GitLab. Learn more about GitLab.
No new issues can be reported in GNOME Bugzilla anymore.
To report an issue in a GNOME project, go to GNOME GitLab.
Do not go to GNOME Gitlab for: Bluefish, Doxygen, GnuCash, GStreamer, java-gnome, LDTP, NetworkManager, Tomboy.
Bug 779216 - split up Details panel
split up Details panel
Status: RESOLVED FIXED
Product: gnome-control-center
Classification: Core
Component: Other Preferences
git master
Other Linux
: High major
: ---
Assigned To: Control-Center Maintainers
Control-Center Maintainers
Depends on:
Blocks:
 
 
Reported: 2017-02-25 12:10 UTC by Mohammed Sadiq
Modified: 2017-07-25 03:19 UTC
See Also:
GNOME target: ---
GNOME version: ---


Attachments
split up Details panel (112.41 KB, patch)
2017-02-25 12:12 UTC, Mohammed Sadiq
none Details | Review
split up Details panel (92.28 KB, patch)
2017-02-25 12:26 UTC, Mohammed Sadiq
none Details | Review
details: Split overview as a separate panel (92.90 KB, patch)
2017-02-27 14:47 UTC, Mohammed Sadiq
committed Details | Review
info: Remove unused code (2.28 KB, patch)
2017-05-21 03:40 UTC, Mohammed Sadiq
committed Details | Review
details: Split default apps as a separate panel (27.46 KB, patch)
2017-05-23 11:17 UTC, Mohammed Sadiq
none Details | Review
details: Split default apps as a separate panel (35.19 KB, patch)
2017-05-24 13:17 UTC, Mohammed Sadiq
none Details | Review
details: Split default apps as a separate panel (34.84 KB, patch)
2017-05-24 13:49 UTC, Mohammed Sadiq
committed Details | Review
info: Remove unused struct members (888 bytes, patch)
2017-05-25 03:16 UTC, Mohammed Sadiq
committed Details | Review
details: Split removable media as a separate panel (127.88 KB, patch)
2017-05-25 09:35 UTC, Mohammed Sadiq
none Details | Review
details: Split removable media as a separate panel (128.78 KB, patch)
2017-05-27 15:33 UTC, Mohammed Sadiq
none Details | Review
details: Split removable media as a separate panel (123.29 KB, patch)
2017-05-28 00:34 UTC, Mohammed Sadiq
none Details | Review
details: Split removable media as a separate panel (123.29 KB, patch)
2017-05-28 00:38 UTC, Mohammed Sadiq
none Details | Review
details: Split removable media as a separate panel (123.31 KB, patch)
2017-05-28 01:02 UTC, Mohammed Sadiq
committed Details | Review
info: Remove dead ui code (19.08 KB, patch)
2017-06-07 06:24 UTC, Mohammed Sadiq
committed Details | Review
info-overview: replace GtkTable with GtkGrid (18.55 KB, patch)
2017-06-07 06:24 UTC, Mohammed Sadiq
committed Details | Review
removable-media: Replace GtkTable with GtkGrid (11.53 KB, patch)
2017-06-07 07:37 UTC, Mohammed Sadiq
committed Details | Review
info-overview: Simplify UI code (3.35 KB, patch)
2017-06-09 23:31 UTC, Mohammed Sadiq
committed Details | Review
removable-media: Avoid use of GtkAlignment (37.63 KB, patch)
2017-06-10 08:41 UTC, Mohammed Sadiq
none Details | Review
removable-media: Avoid use of GtkAlignment (37.63 KB, patch)
2017-06-10 08:47 UTC, Mohammed Sadiq
committed Details | Review
info: Derive subpanels from CcPanel (7.47 KB, patch)
2017-06-10 12:11 UTC, Mohammed Sadiq
committed Details | Review
info: Trivial, fix indentation (70.90 KB, patch)
2017-06-10 12:17 UTC, Mohammed Sadiq
committed Details | Review
info: Show the panels as separate in shell/alt (9.62 KB, patch)
2017-06-10 14:37 UTC, Mohammed Sadiq
none Details | Review
shell-model: Add hidden settings (2.74 KB, patch)
2017-06-10 15:28 UTC, Mohammed Sadiq
none Details | Review
info: Add desktop files for the split panels (7.57 KB, patch)
2017-06-10 15:29 UTC, Mohammed Sadiq
committed Details | Review
shell-model: Add hidden settings (2.60 KB, patch)
2017-07-25 02:15 UTC, Georges Basile Stavracas Neto
committed Details | Review
info: Make margins consistent with other panels (3.71 KB, patch)
2017-07-25 02:34 UTC, Georges Basile Stavracas Neto
committed Details | Review
panel-loader: Cosmetic changes (2.20 KB, patch)
2017-07-25 02:34 UTC, Georges Basile Stavracas Neto
committed Details | Review
info-panel: Remove unused headers (2.42 KB, patch)
2017-07-25 03:19 UTC, Mohammed Sadiq
none Details | Review

Description Mohammed Sadiq 2017-02-25 12:10:02 UTC
As for the new gnome-control-center design, each page of details page has to be split up to fit to the new design.
Comment 1 Mohammed Sadiq 2017-02-25 12:12:18 UTC
Created attachment 346705 [details] [review]
split up Details panel

This patch splits only the Overview panel. Please review the patch,
and let me know if I'm doing things right. :)
Comment 2 Mohammed Sadiq 2017-02-25 12:26:59 UTC
Created attachment 346708 [details] [review]
split up Details panel
Comment 3 Georges Basile Stavracas Neto 2017-02-27 14:12:54 UTC
Review of attachment 346708 [details] [review]:

Overall, the patch is pretty simple and looks good. There are a couple of issues though:
 - It'd be better to call the new class CcInfoOverViewPanel (will avoid renaming it in the future)
 - The commit message needs much more improvement... See the log of Control Center's git repo to see how they should be formatted.

::: panels/info/Makefile.am
@@ +23,3 @@
 	cc-info-panel.h		\
+	cc-info-overview.c		\
+	cc-info-overview.h		\

Misalingnment of '\'
Comment 4 Mohammed Sadiq 2017-02-27 14:47:20 UTC
Created attachment 346825 [details] [review]
details: Split overview as a separate panel

The new shell design requires each panel to be separate.

This commit splits the overview page from details panel as a seperate
panel.
Comment 5 Georges Basile Stavracas Neto 2017-03-02 18:24:52 UTC
Review of attachment 346825 [details] [review]:

Looks good
Comment 6 Georges Basile Stavracas Neto 2017-03-29 20:38:08 UTC
Comment on attachment 346825 [details] [review]
details: Split overview as a separate panel

Thanks for the patch. Now that we're entering GNOME 3.26 cycle, I'll push the patch.

Attachment 346825 [details] pushed as fd5c0e8 - details: Split overview as a separate panel
Comment 7 Georges Basile Stavracas Neto 2017-04-27 11:40:45 UTC
Because the redesign is a priority for 3.26, I'm increasing the priority of this bug.
Comment 8 Mohammed Sadiq 2017-05-21 03:40:12 UTC
Created attachment 352255 [details] [review]
info: Remove unused code
Comment 9 Georges Basile Stavracas Neto 2017-05-21 13:15:28 UTC
Review of attachment 352255 [details] [review]:

Looks good!
Comment 10 Georges Basile Stavracas Neto 2017-05-21 13:16:50 UTC
Comment on attachment 352255 [details] [review]
info: Remove unused code

Pushed with a minor addition to the commit message.

Attachment 352255 [details] pushed as 7bebbc0 - info: Remove unused code
Comment 11 Mohammed Sadiq 2017-05-23 11:17:47 UTC
Created attachment 352405 [details] [review]
details: Split default apps as a separate panel
Comment 12 Mohammed Sadiq 2017-05-23 11:18:32 UTC
The above patch is almost complete. The mnemonic actions are not configured.
Comment 13 Mohammed Sadiq 2017-05-24 13:17:15 UTC
Created attachment 352494 [details] [review]
details: Split default apps as a separate panel
Comment 14 Georges Basile Stavracas Neto 2017-05-24 13:38:50 UTC
Review of attachment 352494 [details] [review]:

Per IRC discussion, the mnemonic issue should be handled like Calendar using struct offsets: https://git.gnome.org//browse/gnome-calendar/tree/src/gcal-edit-dialog.c#n758

::: panels/info/cc-info-default-apps-panel.c
@@ +76,3 @@
+
+  /*< private >*/
+  CcInfoDefaultAppsPanelPrivate *priv;

You don't need a private struct when on final classes. Just use this struct directly.

@@ +80,3 @@
+
+
+G_DEFINE_TYPE_WITH_PRIVATE (CcInfoDefaultAppsPanel, cc_info_default_apps_panel, GTK_TYPE_BOX)

G_DEFINE_TYPE() only, without private

@@ +86,3 @@
+{
+  G_OBJECT_CLASS (cc_info_default_apps_panel_parent_class)->finalize (object);
+}

Since finalize() is empty, you can just not override it.

@@ +186,3 @@
+
+static void
+info_panel_setup_default_apps (CcInfoDefaultAppsPanel  *self)

Use only one space in function parameter.

@@ +190,3 @@
+  int i;
+
+  for (i = 0; i < G_N_ELEMENTS(preferred_app_infos); i++)

Space between 'G_N_ELEMENTS' and '('
Comment 15 Mohammed Sadiq 2017-05-24 13:49:32 UTC
Created attachment 352496 [details] [review]
details: Split default apps as a separate panel
Comment 16 Georges Basile Stavracas Neto 2017-05-24 13:57:44 UTC
Comment on attachment 352496 [details] [review]
details: Split default apps as a separate panel

LGTM
Comment 17 Georges Basile Stavracas Neto 2017-05-24 13:59:11 UTC
Comment on attachment 352496 [details] [review]
details: Split default apps as a separate panel

Attachment 352496 [details] pushed as 1154658 - details: Split default apps as a separate panel
Comment 18 Mohammed Sadiq 2017-05-25 03:16:09 UTC
Created attachment 352546 [details] [review]
info: Remove unused struct members

These struct members has been moved to overview panel and is
no longer used here.
Comment 19 Mohammed Sadiq 2017-05-25 09:35:11 UTC
Created attachment 352562 [details] [review]
details: Split removable media as a separate panel
Comment 20 Georges Basile Stavracas Neto 2017-05-27 15:07:53 UTC
Review of attachment 352546 [details] [review]:

++
Comment 21 Georges Basile Stavracas Neto 2017-05-27 15:13:32 UTC
Review of attachment 352562 [details] [review]:

That CcInfoMediaDialog class is an overkill. Having the dialog in 'info-removable-media.ui' is just fine. Some other comments below.

::: panels/info/cc-info-panel.c
@@ +211,3 @@
   info_panel_setup_selector (self);
   info_panel_setup_overview (self);
+  /* info_panel_setup_media (self); */

You should completely remove it rather than commenting it out.

::: panels/info/cc-info-removable-media-panel.c
@@ +80,3 @@
+  GtkWidget *media_software_combobox;
+
+  GtkWidget *media_dialog;

The struct fields should be visually aligned.

@@ +571,3 @@
+{
+  G_OBJECT_CLASS (cc_info_removable_media_panel_parent_class)->finalize (object);
+}

No need to override it finalize() it's empty.

@@ +608,3 @@
+
+GtkWidget *
+cc_info_removable_media_panel_new (void)

Not needed.

::: panels/info/cc-info-removable-media-panel.h
@@ +29,3 @@
+G_DECLARE_FINAL_TYPE (CcInfoRemovableMediaPanel, cc_info_removable_media_panel, CC, INFO_REMOVABLE_MEDIA_PANEL, GtkBox)
+
+GtkWidget *cc_info_removable_media_panel_new (void);

Not needed.
Comment 22 Georges Basile Stavracas Neto 2017-05-27 15:14:03 UTC
Comment on attachment 352546 [details] [review]
info: Remove unused struct members

Attachment 352546 [details] pushed as 84ccb36 - info: Remove unused struct members
Comment 23 Mohammed Sadiq 2017-05-27 15:33:33 UTC
Created attachment 352691 [details] [review]
details: Split removable media as a separate panel
Comment 24 Mohammed Sadiq 2017-05-27 15:37:34 UTC
(In reply to Georges Basile Stavracas Neto from comment #21)
> Review of attachment 352562 [details] [review] [review]:
> 
> That CcInfoMediaDialog class is an overkill. Having the dialog in
> 'info-removable-media.ui' is just fine. Some other comments below.

We moved the ui to templates. So I thought it would be easy to use another template (ie, another class) for CcInfoMediaDialog rather than adding hacks to the template and use builder again.
Comment 25 Mohammed Sadiq 2017-05-28 00:34:21 UTC
Created attachment 352699 [details] [review]
details: Split removable media as a separate panel
Comment 26 Mohammed Sadiq 2017-05-28 00:38:10 UTC
Created attachment 352700 [details] [review]
details: Split removable media as a separate panel
Comment 27 Georges Basile Stavracas Neto 2017-05-28 00:42:38 UTC
Review of attachment 352700 [details] [review]:

LGTM
Comment 28 Georges Basile Stavracas Neto 2017-05-28 00:46:38 UTC
Review of attachment 352700 [details] [review]:

Actually, there's a runtime error.
Comment 29 Mohammed Sadiq 2017-05-28 01:02:12 UTC
Created attachment 352701 [details] [review]
details: Split removable media as a separate panel

The runtime error was also occuring in master. So this
was introduced long time ago.

Anyway, this has been fixed by checking for NULL.

Error from sanitizer:
cc-info-removable-media-panel.c:324:52: runtime error: null pointer passed as argument 1, which is declared to never be null
Comment 30 Georges Basile Stavracas Neto 2017-06-04 13:37:51 UTC
Review of attachment 352701 [details] [review]:

Looks good!
Comment 31 Georges Basile Stavracas Neto 2017-06-04 13:41:50 UTC
Comment on attachment 352701 [details] [review]
details: Split removable media as a separate panel

Attachment 352701 [details] pushed as 8713eac - details: Split removable media as a separate panel
Comment 32 Jeremy Bicha 2017-06-05 04:31:52 UTC
Removable Media doesn't look like a separate panel with gnome-control-center-alt in git master. Maybe there's more work to be done?
Comment 33 Mohammed Sadiq 2017-06-05 06:28:24 UTC
(In reply to Jeremy Bicha from comment #32)
> Removable Media doesn't look like a separate panel with
> gnome-control-center-alt in git master. Maybe there's more work to be done?

Yeah. The work is done only in gnome-control-center not in alternate gnome-control-center-alt. It has to be done.
Comment 34 Georges Basile Stavracas Neto 2017-06-05 11:39:42 UTC
(In reply to Jeremy Bicha from comment #32)
> Removable Media doesn't look like a separate panel with
> gnome-control-center-alt in git master. Maybe there's more work to be done?

It is not meant to be seen as split panels ~yet~. Sadiq is splitting the code in various subclasses but, until we're not 100% sure we'll move to the new Shell, it'll be one Details panel.

When the Network and Sound panels redesigns land, then we drop the bomb and make the various Details subpanels different panels.
Comment 35 Mohammed Sadiq 2017-06-07 06:24:01 UTC
Created attachment 353290 [details] [review]
info: Remove dead ui code
Comment 36 Mohammed Sadiq 2017-06-07 06:24:17 UTC
Created attachment 353291 [details] [review]
info-overview: replace GtkTable with GtkGrid

GtkTable has been deprecated. So let it be replaced with
GtkGrid.
Comment 37 Mohammed Sadiq 2017-06-07 07:37:56 UTC
Created attachment 353292 [details] [review]
removable-media: Replace GtkTable with GtkGrid
Comment 38 Georges Basile Stavracas Neto 2017-06-09 15:16:55 UTC
Review of attachment 353290 [details] [review]:

Looks good. I'm sure you could write better commit messages...
Comment 39 Georges Basile Stavracas Neto 2017-06-09 15:21:01 UTC
Review of attachment 353291 [details] [review]:

Looks good too.
Comment 40 Georges Basile Stavracas Neto 2017-06-09 15:21:20 UTC
Review of attachment 353292 [details] [review]:

Looks good.
Comment 41 Georges Basile Stavracas Neto 2017-06-09 15:22:47 UTC
Attachment 353290 [details] pushed as d6db504 - info: Remove dead ui code
Attachment 353291 [details] pushed as 695887c - info-overview: replace GtkTable with GtkGrid
Attachment 353292 [details] pushed as 4a06cff - removable-media: Replace GtkTable with GtkGrid
Comment 42 Mohammed Sadiq 2017-06-09 23:31:24 UTC
Created attachment 353498 [details] [review]
info-overview: Simplify UI code

Increasing width of a column makes column in each row to have the same
width. So it is unnecessary to set 3rd column of each row separately to
have the same width. Let's do it just once.
Comment 43 Mohammed Sadiq 2017-06-10 08:41:12 UTC
Created attachment 353508 [details] [review]
removable-media: Avoid use of GtkAlignment

GtkAlignment has been deprecated since Gtk 3.14.
So Let's replace it with properties like "valign", "halign",
"margin", and so on.


Sorry, it's a bit noisy.
What I have done is replace usage of <property name="left_padding">12</property>
with <property name="margin-left">12</property> in the child (also remove GtkAlignment)
and the whole source code is indented.
Comment 44 Mohammed Sadiq 2017-06-10 08:47:03 UTC
Created attachment 353509 [details] [review]
removable-media: Avoid use of GtkAlignment

GtkAlignment has been deprecated since Gtk 3.14.
So Let's replace it with properties like "valign", "halign",
"margin", and so on.

replaced margin-left from last patch with margin-start.
Comment 45 Georges Basile Stavracas Neto 2017-06-10 11:36:31 UTC
Review of attachment 353498 [details] [review]:

Nice.
Comment 46 Georges Basile Stavracas Neto 2017-06-10 11:48:09 UTC
Review of attachment 353509 [details] [review]:

Noisy, but good enough.
Comment 47 Georges Basile Stavracas Neto 2017-06-10 11:48:39 UTC
Attachment 353498 [details] pushed as 572f9fe - info-overview: Simplify UI code
Attachment 353509 [details] pushed as f82af13 - removable-media: Avoid use of GtkAlignment
Comment 48 Mohammed Sadiq 2017-06-10 12:11:12 UTC
Created attachment 353519 [details] [review]
info: Derive subpanels from CcPanel

This is required for adding these subpanels as panels
for the new g-c-c shell design.
Comment 49 Mohammed Sadiq 2017-06-10 12:17:27 UTC
Created attachment 353520 [details] [review]
info: Trivial, fix indentation
Comment 50 Georges Basile Stavracas Neto 2017-06-10 12:23:05 UTC
Review of attachment 353519 [details] [review]:

Looks good.
Comment 51 Georges Basile Stavracas Neto 2017-06-10 12:23:49 UTC
Review of attachment 353520 [details] [review]:

Looks good
Comment 52 Georges Basile Stavracas Neto 2017-06-10 12:25:15 UTC
Attachment 353519 [details] pushed as 0e01c7d - info: Derive subpanels from CcPanel
Attachment 353520 [details] pushed as bab859a - info: Trivial, fix indentation
Comment 53 Mohammed Sadiq 2017-06-10 14:37:51 UTC
Created attachment 353527 [details] [review]
info: Show the panels as separate in shell/alt

Show only the Details panel in current design.

In alternate shell design, hide the Details panel, and show subpanels
as panels.

A few things are yet to be done:
* Add a separate symbolic icon for each panel
* Set the right padding from margin
* Add some command line arguments that will load the corresponding panel
Comment 54 Mohammed Sadiq 2017-06-10 15:28:50 UTC
Created attachment 353528 [details] [review]
shell-model: Add hidden settings

Some panels shall be shown only in current design, And some other panels
shall be shown only in new Shell design. So let's have a code that
would help us do that
Comment 55 Mohammed Sadiq 2017-06-10 15:29:23 UTC
Created attachment 353529 [details] [review]
info: Add desktop files for the split panels

This commit shall show the panels separate.

Some panels are hidden in current design, while some other panels
are hidden in new shell design.
Comment 56 Georges Basile Stavracas Neto 2017-07-25 02:12:54 UTC
Review of attachment 353528 [details] [review]:

::: shell/cc-panel-loader.c
@@ +196,3 @@
+#else
+#define CC_HIDE_CATEGORY CC_CATEGORY_HIDDEN
+#endif

By using only one category, this can be removed (and below, just check for "category != CC_CATEGORY_HIDDEN")

::: shell/cc-shell-model.h
@@ +66,3 @@
   CC_CATEGORY_SYSTEM,
   CC_CATEGORY_HARDWARE,
+  CC_CATEGORY_HIDDEN,

This can be simplified by adding only one "CC_CATEGORY_HIDDEN" outside the #ifdefs.
Comment 57 Georges Basile Stavracas Neto 2017-07-25 02:13:13 UTC
Review of attachment 353529 [details] [review]:

Looks good.
Comment 58 Georges Basile Stavracas Neto 2017-07-25 02:15:02 UTC
Created attachment 356329 [details] [review]
shell-model: Add hidden settings

Implement the single CC_CATEGORY_HIDDEN thing mentioned before.
Comment 59 Georges Basile Stavracas Neto 2017-07-25 02:34:19 UTC
Created attachment 356330 [details] [review]
info: Make margins consistent with other panels

All the new panels have a standard 24px margin now, so
since we're already splitting the info pages into separate
panels, also fix this minor annoyance.
Comment 60 Georges Basile Stavracas Neto 2017-07-25 02:34:41 UTC
Created attachment 356331 [details] [review]
panel-loader: Cosmetic changes

This commit only fixes some very minor cosmetic changes
like int → gint, simplifies the code by using g_autofoo,
et cetera.
Comment 61 Georges Basile Stavracas Neto 2017-07-25 02:35:20 UTC
Attachment 353529 [details] pushed as 6cf52ad - info: Add desktop files for the split panels
Attachment 356329 [details] pushed as 1485b50 - shell-model: Add hidden settings
Attachment 356330 [details] pushed as 5bc84ae - info: Make margins consistent with other panels
Attachment 356331 [details] pushed as b419404 - panel-loader: Cosmetic changes
Comment 62 Mohammed Sadiq 2017-07-25 03:19:17 UTC
Created attachment 356332 [details] [review]
info-panel: Remove unused headers