Merge lp://qastaging/~charlesk/indicator-sync/initial-impl into lp://qastaging/indicator-sync/12.10

Proposed by Charles Kerr
Status: Merged
Approved by: Charles Kerr
Approved revision: 21
Merged at revision: 2
Proposed branch: lp://qastaging/~charlesk/indicator-sync/initial-impl
Merge into: lp://qastaging/indicator-sync/12.10
Diff against target: 13733 lines (+13500/-0)
42 files modified
COPYING (+674/-0)
Makefile.am (+50/-0)
Makefile.am.coverage (+48/-0)
autogen.sh (+13/-0)
configure.ac (+208/-0)
data/Makefile.am (+11/-0)
data/icons/22x22/Makefile.am (+1/-0)
data/icons/22x22/status/Makefile.am (+10/-0)
data/icons/Makefile.am (+16/-0)
data/indicator-sync.service.in (+3/-0)
docs/Makefile.am (+1/-0)
docs/reference/Makefile.am (+1/-0)
docs/reference/libindicator-sync-client/Makefile.am (+104/-0)
examples/Makefile.am (+17/-0)
examples/README (+14/-0)
examples/sync-client-demo.c (+217/-0)
indicator-sync/Makefile.am (+173/-0)
indicator-sync/app-menu-item.c (+345/-0)
indicator-sync/app-menu-item.h (+63/-0)
indicator-sync/dbus-shared.h (+39/-0)
indicator-sync/indicator-sync-client.pc.in.in (+14/-0)
indicator-sync/indicator-sync.c (+680/-0)
indicator-sync/sync-client.c (+523/-0)
indicator-sync/sync-client.h (+117/-0)
indicator-sync/sync-client.xml (+29/-0)
indicator-sync/sync-enum.c (+41/-0)
indicator-sync/sync-enum.h (+47/-0)
indicator-sync/sync-service.c (+660/-0)
indicator-sync/sync-service.xml (+19/-0)
m4/gcov.m4 (+86/-0)
m4/gtest.m4 (+63/-0)
m4/intltool.m4 (+237/-0)
m4/introspection.m4 (+96/-0)
m4/libtool.m4 (+8001/-0)
m4/ltoptions.m4 (+384/-0)
m4/ltsugar.m4 (+123/-0)
m4/ltversion.m4 (+23/-0)
m4/lt~obsolete.m4 (+98/-0)
po/Makefile.in.in (+222/-0)
po/POTFILES.in (+6/-0)
test/Makefile.am (+11/-0)
test/test-gtest.cpp (+12/-0)
To merge this branch: bzr merge lp://qastaging/~charlesk/indicator-sync/initial-impl
Reviewer Review Type Date Requested Status
Lars Karlitski (community) Approve
Review via email: mp+120282@code.qastaging.launchpad.net
To post a comment you must log in.
2. By Charles Kerr

in indicator-sync, assume ownership of the ObjectEntry's menu and icon widgets, and unref them in dispose()

3. By Charles Kerr

move sync-client's gtkdoc comments from the header to the source file

4. By Charles Kerr

minor improvements to the gtk-doc markup

5. By Charles Kerr

more markup improvements for gtk-doc

6. By Charles Kerr

hmm, this seems like kind of an important file to have versioned...

7. By Charles Kerr

add gtk-doc support for libindicator-sync-client

8. By Charles Kerr

.exrc shouldn't be in the repo

9. By Charles Kerr

icon-theme.cache shouldn't be in the repo

Revision history for this message
Lars Karlitski (larsu) wrote :

Some minor comments:

* app-menu-item:
  - app_menu_item_new: having initialization in _new makes it very hard for
    bindings (which typically only call g_object_new); a better place to
    initialize would be _init or _constructed
  - no need for g_return_if_fail in non-public gobject methods (there's enough
    type checking in gobject and the type casts)

* indicator-sync:
  - the hard-coded red error color can probably be solved by setting a class on
    the label which is then colored in the css (talk to Cimi)
  - afaict, calculate_prog_menuitem_preferred_width() does the same as
    gtk_label_set_width_chars()

* sync-client
  - there's no need to keep the GBindings around, they will be deleted
    automatically when one of the objects is freed
  - usually, the setter functions are called in set_property (this is the other
    way around)
  - sync client is meant to be used by applications? It probably shouldn't
    block the main loop then (for example: g_bus_get_sync in sync_client_init)
  - header file has private stuff in it (menuitem types)

* sync-enum:
  - interesting docstring on SyncState ;)

* sync-service:
  - why emit_exists when clients can just listen for a unique name to appear

* python bindings: why don't you use gobject-introspection? pygtk is deprecated

Revision history for this message
Lars Karlitski (larsu) wrote :

Some higher level comments:

* why have "exsists" signals on servers and clients when you could just watch for name_vanished
* is the indendation hack in indicator-sync.c (on_app_widget_shown) responsible for the wrong menu highlight on non-application menu items?
* build examples by default
* `make distcheck` doesn't work

10. By Charles Kerr

merge lp:~larsu/indicator-sync/first-review

11. By Charles Kerr

use gtk_image_set_from_icon_name() directly instead of indicator_image_helper_*

12. By Charles Kerr

just a little fun for the sync-client example

Revision history for this message
Charles Kerr (charlesk) wrote :

> app_menu_item_new: having initialization in _new makes it very hard for
> bindings (which typically only call g_object_new); a better place to
> initialize would be _init or _constructed

That would be nice-to-have but this a single-use class, IMO it's not worth refactoring that before FF

> to need for g_return_if_fail in non-public gobject methods (there's enough
> type checking in gobject and the type casts)

Done, r13

> the hard-coded red error color can probably be solved by setting a class on
> the label which is then colored in the css (talk to Cimi)

Will do.

> afaict, calculate_prog_menuitem_preferred_width() does the same as
> gtk_label_set_width_chars()

Doesn't exist for progressbar

> * sync-client
> - there's no need to keep the GBindings around, they will be deleted
> automatically when one of the objects is freed
> - usually, the setter functions are called in set_property (this is the other
> way around)

Fixed r14

> - sync client is meant to be used by applications? It probably shouldn't
> block the main loop then (for example: g_bus_get_sync in sync_client_init)

Fixed r15

> - header file has private stuff in it (menuitem types)

That's public -- it's needed for setting the percent done property on the client menuitems

> * sync-enum:
> - interesting docstring on SyncState ;)

LOL! Fixed r16

> * sync-service:
> - why emit_exists when clients can just listen for a unique name to appear

Fixed r17

> * python bindings: why don't you use gobject-introspection? pygtk is deprecated

Great point!!

Fixed r18

Revision history for this message
Charles Kerr (charlesk) wrote :

> * sync-client
> - there's no need to keep the GBindings around, they will be deleted
> automatically when one of the objects is freed

Actually, we need to explicitly clear the menu_binding... we don't create the menu object that's being bound, so we don't know what its lifespan will be. Reverted in r19 for menu_binding only.

> - usually, the setter functions are called in set_property (this is the other
> way around)

Fixed r19

13. By Charles Kerr

no need for g_return_if_fail in non-public gobject methods

14. By Charles Kerr

no need to keep the GBindings around, they will be deleted automatically when one of the objects is freed

15. By Charles Kerr

in sync-client.c, use g_bus_get() instead of g_bus_get_sync()

16. By Charles Kerr

remove boilerplate comment

17. By Charles Kerr

no need for SyncService to emit an "Exists" signal... clients can watch for its well-known name to show up on the bus

18. By Charles Kerr

use gobject-introspection, pygtk is deprecated

19. By Charles Kerr

in sync-client, have set_property() call the setter functions rather than the other way around.

20. By Charles Kerr

when using gtk_image_*_from_icon_name() for the IndicatorObjectEntry's image, use GTK_ICON_SIZE_BUTTON rather than GTK_ICON_SIZE_MENU

21. By Charles Kerr

use IdoSwitchMenuItem for the apps to get the switch appearance spec'ed in https://wiki.ubuntu.com/SyncMenu

Revision history for this message
Lars Karlitski (larsu) wrote :

> Doesn't exist for progressbar

Ah, right. /me needs to read more careful.

The fixes look great, thanks!

review: Approve

Preview Diff

[H/L] Next/Prev Comment, [J/K] Next/Prev File, [N/P] Next/Prev Hunk
The diff is not available at this time. You can reload the page or download it.

Subscribers

People subscribed via source and target branches

to all changes: