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 624892 - Migrate to GSettings
Migrate to GSettings
Status: RESOLVED FIXED
Product: gucharmap
Classification: Core
Component: general
3.2.x
Other Linux
: Normal normal
: gnome-3-0
Assigned To: gucharmap maintainers
gucharmap maintainers
Depends on:
Blocks: 622558
 
 
Reported: 2010-07-21 02:49 UTC by Rahul
Modified: 2012-01-27 14:23 UTC
See Also:
GNOME target: 3.4
GNOME version: Unversioned Enhancement


Attachments
Contains diff command output for changes done. (9.68 KB, text/plain)
2010-07-26 16:58 UTC, Rahul
  Details
GSettings port (14.75 KB, patch)
2010-08-21 09:32 UTC, Rahul
rejected Details | Review
port to GSettings (29.03 KB, patch)
2012-01-27 07:56 UTC, Allison Karlitskaya (desrt)
committed Details | Review

Description Rahul 2010-07-21 02:49:13 UTC
Hi,

I would like to work on this module towards migration to GSettings.

- Rahul
Comment 1 Rahul 2010-07-26 02:13:54 UTC
Which rpm I need to install for "gsettings-schema-convert" ?

I could not find this on my Fedora 13 installation ?

Please help

- Rahul
Comment 2 Rahul 2010-07-26 16:56:13 UTC
Hi,

Please find initial changes attached here.
I have not compiled it yet..I am in process of upgrading packages at my Fedora 13.

I will upload changes if anything found out during compilation/working.
- Rahul
Comment 3 Rahul 2010-07-26 16:58:13 UTC
Created attachment 166597 [details]
Contains diff command output for changes done.

diff command output for changes.

- Rahul
Comment 4 Rahul 2010-07-28 13:58:30 UTC
any comments please ..
Comment 5 Behdad Esfahbod 2010-07-28 17:55:57 UTC
Cool down.  Eventually ChPe will get to it. :)
Comment 6 Christian Persch 2010-08-18 09:29:55 UTC
A few comments on the patch:

The patch appears to be missing the schemas file?

The schemas file needs to be a .in file, and use @INTLTOOL_XML_NOMERGE_RULE@ to produce the final file.

+  settings = g_settings_new ();

Does that actually work? I think not.

Also, should separate the real settings from the state (window size, current char) into separate schemas, and make the state delay-apply and only apply on exit.

Underscores in gsettings key names need to be replaced by '-'.
Comment 7 Rahul 2010-08-19 18:17:29 UTC
Hi Chpe,

I missed uploading schema file. will upload it.
done most of changes.

but i did not get 
"Also, should separate the real settings from the state (window size, current
char) into separate schemas,"

As of now values of following elements are stored.
chapters_mode
last_char
font
height
snap_cols_pow2
width
maximized
fullscreen


If i understand correctly then did you mean to have 2 child schemas with following elements

for Schema  "state"
Maximized
fullscreen
height
width

and another child schema "info"
chapters_mode
last_char
font
snap_cols_pow2


Please let me know your views.
Comment 8 Christian Persch 2010-08-19 18:34:57 UTC
I'd put last_char into the 'state' schema too. Otherwise looks ok to me.
Comment 9 Rahul 2010-08-21 09:32:27 UTC
Created attachment 168447 [details] [review]
GSettings port

code changes for GSettings port.
Comment 10 Rahul 2010-08-21 09:32:44 UTC
Hi,

Patch attached here.

Chpe,
last_char is related to application specific data, that's why I have added it under "state" schema. even struct maintained for window state has only following elements.

from 
gucharmap-settings.c

typedef struct {
  guint timeout_id;
  int width;
  int height;
  guint is_maximised : 1;
  guint is_fullscreen : 1;
} WindowState;


Please let me know if patch if ok.
Comment 11 Javier Jardón (IRC: jjardon) 2010-11-08 13:59:14 UTC
Chpe: ping. Could you take a look to the Rahul patch?
Comment 12 Christian Persch 2011-02-25 18:19:17 UTC
Not a blocker.
Comment 13 André Klapper 2011-06-23 18:57:41 UTC
Can this ever get a review please?
Comment 14 Javier Jardón (IRC: jjardon) 2011-11-14 17:46:08 UTC
ping
Comment 15 André Klapper 2011-11-29 21:07:28 UTC
Yeah, ping. Is gucharmap maintained? ;-)
Comment 16 Allison Karlitskaya (desrt) 2012-01-27 07:56:04 UTC
Created attachment 206241 [details] [review]
port to GSettings

gucharmap-settings only exists now for the window geometry (until Gtk
grows support for this).
Comment 17 Allison Karlitskaya (desrt) 2012-01-27 14:23:50 UTC
Attachment 206241 [details] pushed as 6eee95f - port to GSettings