Merge lp:~robert-ancell/ido/lp582985 into lp:ido/13.04

Proposed by Robert Ancell
Status: Merged
Approved by: Didier Roche-Tolomelli
Approved revision: 123
Merged at revision: 122
Proposed branch: lp:~robert-ancell/ido/lp582985
Merge into: lp:ido/13.04
Diff against target: 858 lines (+366/-40)
13 files modified
configure.ac (+9/-0)
debian/control (+17/-0)
debian/gir1.2-ido3-0.1.install (+1/-0)
debian/libido3-0.1-dev.install (+2/-0)
src/Makefile.am (+53/-0)
src/idocalendarmenuitem.c (+77/-7)
src/idoentrymenuitem.c (+18/-4)
src/idomessagedialog.c (+20/-1)
src/idorange.c (+2/-0)
src/idoscalemenuitem.c (+62/-22)
src/idoscalemenuitem.h (+2/-2)
src/idoswitchmenuitem.c (+15/-4)
src/idotimeline.c (+88/-0)
To merge this branch: bzr merge lp:~robert-ancell/ido/lp582985
Reviewer Review Type Date Requested Status
PS Jenkins bot (community) continuous-integration Needs Fixing
Mathieu Trudel-Lapierre Approve
Review via email: mp+139791@code.launchpad.net

Commit message

Add introspection and vala support

To post a comment you must log in.
Revision history for this message
PS Jenkins bot (ps-jenkins) wrote :
review: Needs Fixing (continuous-integration)
Revision history for this message
Robert Ancell (robert-ancell) wrote :

I think the build failure might be because the packaging branch that Jenkins is using won't have the dependencies required for this? I can update the packaging but not sure where it is...

Revision history for this message
Mathieu Trudel-Lapierre (cyphermox) wrote :

Correct, given that we now use "inline" packaging (split mode in bzr), you'll want to add gobject-introspection to the build-depends.

review: Needs Fixing
Revision history for this message
Robert Ancell (robert-ancell) wrote :

Whoops, I was looking at libindicate. Now I notice debian/ is in ido. Too many i* names...

Revision history for this message
PS Jenkins bot (ps-jenkins) wrote :
review: Needs Fixing (continuous-integration)
Revision history for this message
PS Jenkins bot (ps-jenkins) wrote :
review: Needs Fixing (continuous-integration)
Revision history for this message
Robert Ancell (robert-ancell) wrote :

Hmm, the amd64 build failure seems to be something to do with Xvfb? I can't trigger a rebuild it seems, can someone?

Revision history for this message
Allan LeSage (allanlesage) wrote :

Let me do a test build Robert, will report here.

Revision history for this message
PS Jenkins bot (ps-jenkins) wrote :
review: Approve (continuous-integration)
Revision history for this message
Allan LeSage (allanlesage) wrote :
Revision history for this message
Robert Ancell (robert-ancell) wrote :

Thanks Allan!

Revision history for this message
Mathieu Trudel-Lapierre (cyphermox) wrote :

Approve

review: Approve
Revision history for this message
PS Jenkins bot (ps-jenkins) wrote :

FAILED: Autolanding.
No commit message was specified.

review: Needs Fixing (continuous-integration)
Revision history for this message
Allan LeSage (allanlesage) wrote :

The "use description for commit" option was set for this build--attempting again.

Revision history for this message
PS Jenkins bot (ps-jenkins) wrote :

FAILED: Autolanding.
No commit message was specified.

review: Needs Fixing (continuous-integration)

Preview Diff

[H/L] Next/Prev Comment, [J/K] Next/Prev File, [N/P] Next/Prev Hunk
=== modified file 'configure.ac'
--- configure.ac 2012-11-08 15:37:00 +0000
+++ configure.ac 2012-12-15 07:41:19 +0000
@@ -123,6 +123,14 @@
123AC_SUBST(COVERAGE_CXXFLAGS)123AC_SUBST(COVERAGE_CXXFLAGS)
124AC_SUBST(COVERAGE_LDFLAGS)124AC_SUBST(COVERAGE_LDFLAGS)
125125
126dnl = GObject Introspection ===================================================
127
128GOBJECT_INTROSPECTION_CHECK([0.6.7])
129
130dnl = Vala API Generation =====================================================
131
132AC_PATH_PROG([VALA_API_GEN], [vapigen])
133
126dnl = Google Test Framework ===================================================134dnl = Google Test Framework ===================================================
127135
128m4_include([m4/gtest.m4])136m4_include([m4/gtest.m4])
@@ -152,6 +160,7 @@
152echo ""160echo ""
153echo " Prefix : ${prefix}"161echo " Prefix : ${prefix}"
154echo " gcov : ${use_gcov}"162echo " gcov : ${use_gcov}"
163echo " introspection: ${enable_introspection}"
155echo ""164echo ""
156echo " Documentation: ${enable_gtk_doc}"165echo " Documentation: ${enable_gtk_doc}"
157echo ""166echo ""
158167
=== modified file 'debian/control'
--- debian/control 2012-12-05 15:40:53 +0000
+++ debian/control 2012-12-15 07:41:19 +0000
@@ -11,6 +11,11 @@
11 libglib2.0-dev (>=2.14.0),11 libglib2.0-dev (>=2.14.0),
12 libgtk-3-dev (>= 3.0),12 libgtk-3-dev (>= 3.0),
13 gtk-doc-tools,13 gtk-doc-tools,
14 gobject-introspection,
15 libgirepository1.0-dev,
16 gir1.2-glib-2.0,
17 gir1.2-gtk-2.0,
18 valac-0.16
14Standards-Version: 3.9.319Standards-Version: 3.9.3
15Homepage: https://launchpad.net/ido20Homepage: https://launchpad.net/ido
16# If you aren't a member of ~indicator-applet-developers but need to upload21# If you aren't a member of ~indicator-applet-developers but need to upload
@@ -44,3 +49,15 @@
44 system indicators49 system indicators
45 .50 .
46 This package contains files that are needed to build GTK+ 3 applications.51 This package contains files that are needed to build GTK+ 3 applications.
52
53Package: gir1.2-ido3-0.1
54Section: libs
55Architecture: any
56Depends: ${misc:Depends},
57 libido3-0.1-0 (>= ${binary:Version}),
58 ${gir:Depends}
59Description: Typelib file for libido3-0.1
60 Shared library providing extra gtk menu items for display in system indicators.
61 .
62 This package can be used by other packages using the GIRepository format to
63 generate dynamic bindings for libido3-0.1.
4764
=== added file 'debian/gir1.2-ido3-0.1.install'
--- debian/gir1.2-ido3-0.1.install 1970-01-01 00:00:00 +0000
+++ debian/gir1.2-ido3-0.1.install 2012-12-15 07:41:19 +0000
@@ -0,0 +1,1 @@
1usr/lib/*/girepository-1.0 /usr/lib
02
=== modified file 'debian/libido3-0.1-dev.install'
--- debian/libido3-0.1-dev.install 2012-11-19 18:58:43 +0000
+++ debian/libido3-0.1-dev.install 2012-12-15 07:41:19 +0000
@@ -1,3 +1,5 @@
1usr/include/libido3-*1usr/include/libido3-*
2usr/lib/*/pkgconfig/libido3-*2usr/lib/*/pkgconfig/libido3-*
3usr/lib/*/libido3-*.so3usr/lib/*/libido3-*.so
4usr/share/vala
5usr/share/gir-1.0
46
=== modified file 'src/Makefile.am'
--- src/Makefile.am 2012-08-22 14:39:22 +0000
+++ src/Makefile.am 2012-12-15 07:41:19 +0000
@@ -1,3 +1,5 @@
1CLEANFILES =
2
1VER=33VER=3
2lib_LTLIBRARIES = libido3-0.1.la4lib_LTLIBRARIES = libido3-0.1.la
35
@@ -94,3 +96,54 @@
94 idotypebuiltins.h \96 idotypebuiltins.h \
95 idotypebuiltins.c97 idotypebuiltins.c
9698
99-include $(INTROSPECTION_MAKEFILE)
100INTROSPECTION_GIRS =
101INTROSPECTION_SCANNER_ARGS = \
102 --symbol-prefix=ido \
103 --warn-all \
104 --identifier-prefix=Ido
105
106if HAVE_INTROSPECTION
107
108Ido3-0.1.gir: libido3-0.1.la
109Ido3_0_1_gir_INCLUDES = Gtk-3.0
110Ido3_0_1_gir_CFLAGS =
111Ido3_0_1_gir_LIBS = libido3-0.1.la
112Ido3_0_1_gir_FILES = \
113 idocalendarmenuitem.h \
114 idoentrymenuitem.h \
115 idomessagedialog.h \
116 idorange.h \
117 idoscalemenuitem.h \
118 idoswitchmenuitem.h \
119 idotimeline.h \
120 $(libido_0_1_la_SOURCES)
121Ido3_0_1_gir_NAMESPACE = Ido3
122Ido3_0_1_gir_VERSION = 0.1
123Ido3_0_1_gir_SCANNER_FLAGS = $(INTROSPECTION_SCANNER_ARGS)
124
125INTROSPECTION_GIRS += Ido3-0.1.gir
126
127girdir = $(datadir)/gir-1.0
128gir_DATA = $(INTROSPECTION_GIRS)
129
130typelibdir = $(libdir)/girepository-1.0
131typelib_DATA = $(INTROSPECTION_GIRS:.gir=.typelib)
132
133CLEANFILES += $(gir_DATA) $(typelib_DATA)
134
135endif
136
137if HAVE_INTROSPECTION
138
139vapidir = $(datadir)/vala/vapi
140vapi_DATA = Ido3-0.1.vapi
141
142Ido3-0.1.vapi: Ido3-0.1.gir
143 $(VALA_API_GEN) --library=Ido3-0.1 \
144 --pkg gtk+-3.0 \
145 $<
146
147CLEANFILES += $(vapi_DATA)
148
149endif
97150
=== modified file 'src/idocalendarmenuitem.c'
--- src/idocalendarmenuitem.c 2012-09-20 04:32:58 +0000
+++ src/idocalendarmenuitem.c 2012-12-15 07:41:19 +0000
@@ -324,21 +324,44 @@
324 g_signal_emit_by_name (item, "day-selected-double-click", NULL);324 g_signal_emit_by_name (item, "day-selected-double-click", NULL);
325}325}
326326
327/* Public API */327/**
328 * ido_calendar_menu_item_new:
329 *
330 * Creates a new #IdoCalendarMenuItem
331 *
332 * Return Value: a new #IdoCalendarMenuItem.
333 **/
328GtkWidget *334GtkWidget *
329ido_calendar_menu_item_new (void)335ido_calendar_menu_item_new (void)
330{336{
331 return g_object_new (IDO_TYPE_CALENDAR_MENU_ITEM, NULL);337 return g_object_new (IDO_TYPE_CALENDAR_MENU_ITEM, NULL);
332}338}
333339
340/**
341 * ido_calendar_menu_item_get_calendar:
342 * @menuitem: A #IdoCalendarMenuItem
343 *
344 * Returns the calendar associated with this menu item.
345 *
346 * Return Value: (transfer none): The #GtkCalendar used in this item.
347 */
334GtkWidget *348GtkWidget *
335ido_calendar_menu_item_get_calendar (IdoCalendarMenuItem *item)349ido_calendar_menu_item_get_calendar (IdoCalendarMenuItem *menuitem)
336{350{
337 g_return_val_if_fail (IDO_IS_CALENDAR_MENU_ITEM (item), NULL);351 g_return_val_if_fail (IDO_IS_CALENDAR_MENU_ITEM (menuitem), NULL);
338352
339 return item->priv->calendar;353 return menuitem->priv->calendar;
340}354}
341355
356/**
357 * ido_calendar_menu_item_mark_day:
358 * @menuitem: A #IdoCalendarMenuItem
359 * @day: the day number to unmark between 1 and 31.
360 *
361 * Places a visual marker on a particular day.
362 *
363 * Return Value: #TRUE
364 */
342gboolean365gboolean
343ido_calendar_menu_item_mark_day (IdoCalendarMenuItem *menuitem, guint day)366ido_calendar_menu_item_mark_day (IdoCalendarMenuItem *menuitem, guint day)
344{367{
@@ -348,6 +371,15 @@
348 return TRUE;371 return TRUE;
349}372}
350373
374/**
375 * ido_calendar_menu_item_unmark_day:
376 * @menuitem: A #IdoCalendarMenuItem
377 * @day: the day number to unmark between 1 and 31.
378 *
379 * Removes the visual marker from a particular day.
380 *
381 * Return Value: #TRUE
382 */
351gboolean383gboolean
352ido_calendar_menu_item_unmark_day (IdoCalendarMenuItem *menuitem, guint day)384ido_calendar_menu_item_unmark_day (IdoCalendarMenuItem *menuitem, guint day)
353{385{
@@ -357,6 +389,12 @@
357 return TRUE;389 return TRUE;
358}390}
359391
392/**
393 * ido_calendar_menu_item_clear_marks:
394 * @menuitem: A #IdoCalendarMenuItem
395 *
396 * Remove all visual markers.
397 */
360void398void
361ido_calendar_menu_item_clear_marks (IdoCalendarMenuItem *menuitem)399ido_calendar_menu_item_clear_marks (IdoCalendarMenuItem *menuitem)
362{400{
@@ -365,6 +403,13 @@
365 gtk_calendar_clear_marks(GTK_CALENDAR (menuitem->priv->calendar));403 gtk_calendar_clear_marks(GTK_CALENDAR (menuitem->priv->calendar));
366}404}
367405
406/**
407 * ido_calendar_menu_item_set_display_options:
408 * @menuitem: A #IdoCalendarMenuItem
409 * @flags: the display options to set
410 *
411 * Set the display options for the calendar.
412 */
368void413void
369ido_calendar_menu_item_set_display_options (IdoCalendarMenuItem *menuitem, GtkCalendarDisplayOptions flags)414ido_calendar_menu_item_set_display_options (IdoCalendarMenuItem *menuitem, GtkCalendarDisplayOptions flags)
370{415{
@@ -373,6 +418,14 @@
373 gtk_calendar_set_display_options (GTK_CALENDAR (menuitem->priv->calendar), flags);418 gtk_calendar_set_display_options (GTK_CALENDAR (menuitem->priv->calendar), flags);
374}419}
375420
421/**
422 * ido_calendar_menu_item_get_display_options:
423 * @menuitem: A #IdoCalendarMenuItem
424 *
425 * Get the display options for the calendar.
426 *
427 * Return Value: the display options in use
428 */
376GtkCalendarDisplayOptions429GtkCalendarDisplayOptions
377ido_calendar_menu_item_get_display_options (IdoCalendarMenuItem *menuitem)430ido_calendar_menu_item_get_display_options (IdoCalendarMenuItem *menuitem)
378{431{
@@ -381,6 +434,15 @@
381 return gtk_calendar_get_display_options (GTK_CALENDAR (menuitem->priv->calendar));434 return gtk_calendar_get_display_options (GTK_CALENDAR (menuitem->priv->calendar));
382}435}
383436
437/**
438 * ido_calendar_menu_item_get_date:
439 * @menuitem: A #IdoCalendarMenuItem
440 * @year: (out) (allow-none): location to store the year as a decimal number (e.g. 2011), or #NULL.
441 * @month: (out) (allow-none): location to store the month number (between 0 and 11), or #NULL.
442 * @day: (out) (allow-none): location to store the day number (between 1 and 31), or #NULL.
443 *
444 * Gets the selected date.
445 */
384void 446void
385ido_calendar_menu_item_get_date (IdoCalendarMenuItem *menuitem,447ido_calendar_menu_item_get_date (IdoCalendarMenuItem *menuitem,
386 guint *year,448 guint *year,
@@ -391,6 +453,17 @@
391 gtk_calendar_get_date (GTK_CALENDAR (menuitem->priv->calendar), year, month, day);453 gtk_calendar_get_date (GTK_CALENDAR (menuitem->priv->calendar), year, month, day);
392}454}
393455
456/**
457 * ido_calendar_menu_item_set_date:
458 * @menuitem: A #IdoCalendarMenuItem
459 * @year: the year to show (e.g. 2011).
460 * @month: a month number (between 0 and 11).
461 * @day: The day number (between 1 and 31).
462 *
463 * Set the date shown on the calendar.
464 *
465 * Return Value: #TRUE
466 */
394gboolean467gboolean
395ido_calendar_menu_item_set_date (IdoCalendarMenuItem *menuitem,468ido_calendar_menu_item_set_date (IdoCalendarMenuItem *menuitem,
396 guint year,469 guint year,
@@ -402,6 +475,3 @@
402 gtk_calendar_select_day (GTK_CALENDAR (menuitem->priv->calendar), day);475 gtk_calendar_select_day (GTK_CALENDAR (menuitem->priv->calendar), day);
403 return TRUE;476 return TRUE;
404}477}
405
406
407
408478
=== modified file 'src/idoentrymenuitem.c'
--- src/idoentrymenuitem.c 2012-08-22 14:41:36 +0000
+++ src/idoentrymenuitem.c 2012-12-15 07:41:19 +0000
@@ -260,17 +260,31 @@
260 GTK_DIR_TAB_FORWARD);260 GTK_DIR_TAB_FORWARD);
261}261}
262262
263/* Public API */263/**
264 * ido_entry_menu_item_new:
265 *
266 * Creates a new #IdoEntryMenuItem.
267 *
268 * Return Value: the newly created #IdoEntryMenuItem.
269 */
264GtkWidget *270GtkWidget *
265ido_entry_menu_item_new (void)271ido_entry_menu_item_new (void)
266{272{
267 return g_object_new (IDO_TYPE_ENTRY_MENU_ITEM, NULL);273 return g_object_new (IDO_TYPE_ENTRY_MENU_ITEM, NULL);
268}274}
269275
276/**
277 * ido_entry_menu_item_get_entry:
278 * @menuitem: The #IdoEntryMenuItem.
279 *
280 * Get the #GtkEntry used in this menu item.
281 *
282 * Return Value: (transfer none): The #GtkEntry inside this menu item.
283 */
270GtkWidget *284GtkWidget *
271ido_entry_menu_item_get_entry (IdoEntryMenuItem *item)285ido_entry_menu_item_get_entry (IdoEntryMenuItem *menuitem)
272{286{
273 g_return_val_if_fail (IDO_IS_ENTRY_MENU_ITEM (item), NULL);287 g_return_val_if_fail (IDO_IS_ENTRY_MENU_ITEM (menuitem), NULL);
274288
275 return item->priv->entry;289 return menuitem->priv->entry;
276}290}
277291
=== modified file 'src/idomessagedialog.c'
--- src/idomessagedialog.c 2012-08-22 14:44:00 +0000
+++ src/idomessagedialog.c 2012-12-15 07:41:19 +0000
@@ -258,7 +258,7 @@
258 * dialog it will expand to provide the secondary message258 * dialog it will expand to provide the secondary message
259 * and the action buttons.259 * and the action buttons.
260 *260 *
261 * Return value: a new #IdoMessageDialog261 * Return Value: a new #IdoMessageDialog
262 **/262 **/
263GtkWidget*263GtkWidget*
264ido_message_dialog_new (GtkWindow *parent,264ido_message_dialog_new (GtkWindow *parent,
@@ -305,6 +305,25 @@
305 return widget;305 return widget;
306}306}
307307
308/**
309 * ido_message_dialog_new_with_markup:
310 * @parent: transient parent, or %NULL for none
311 * @flags: flags
312 * @type: type of message
313 * @buttons: a set of buttons to use
314 * @message_format: printf()-style format string, or %NULL
315 * @Varargs: arguments for @message_format. They will be escaped to allow valid XML.
316 *
317 * Creates a new message dialog, which is based upon
318 * GtkMessageDialog so it shares API and functionality
319 * with it. IdoMessageDialog differs in that it has two
320 * states. The initial state hides the action buttons
321 * and the secondary message. When a user clicks on the
322 * dialog it will expand to provide the secondary message
323 * and the action buttons.
324 *
325 * Return Value: a new #IdoMessageDialog
326 **/
308GtkWidget*327GtkWidget*
309ido_message_dialog_new_with_markup (GtkWindow *parent,328ido_message_dialog_new_with_markup (GtkWindow *parent,
310 GtkDialogFlags flags,329 GtkDialogFlags flags,
311330
=== modified file 'src/idorange.c'
--- src/idorange.c 2012-08-27 20:01:07 +0000
+++ src/idorange.c 2012-12-15 07:41:19 +0000
@@ -172,6 +172,8 @@
172 * @style: The range style172 * @style: The range style
173 *173 *
174 * Creates a new #IdoRange widget.174 * Creates a new #IdoRange widget.
175 *
176 * Return Value: A new #IdoRange
175 **/177 **/
176GtkWidget *178GtkWidget *
177ido_range_new (GObject *adj,179ido_range_new (GObject *adj,
178180
=== modified file 'src/idoscalemenuitem.c'
--- src/idoscalemenuitem.c 2012-08-27 20:01:07 +0000
+++ src/idoscalemenuitem.c 2012-12-15 07:41:19 +0000
@@ -309,6 +309,12 @@
309 FALSE,309 FALSE,
310 G_PARAM_READWRITE));310 G_PARAM_READWRITE));
311311
312 /**
313 * IdoScaleMenuItem::slider-grabbed:
314 * @menuitem: The #IdoScaleMenuItem emitting the signal.
315 *
316 * The ::slider-grabbed signal is emitted when the pointer selects the slider.
317 */
312 signals[SLIDER_GRABBED] = g_signal_new ("slider-grabbed",318 signals[SLIDER_GRABBED] = g_signal_new ("slider-grabbed",
313 G_OBJECT_CLASS_TYPE (gobject_class),319 G_OBJECT_CLASS_TYPE (gobject_class),
314 G_SIGNAL_RUN_FIRST,320 G_SIGNAL_RUN_FIRST,
@@ -317,6 +323,12 @@
317 g_cclosure_marshal_VOID__VOID,323 g_cclosure_marshal_VOID__VOID,
318 G_TYPE_NONE, 0);324 G_TYPE_NONE, 0);
319325
326 /**
327 * IdoScaleMenuItem::slider-released:
328 * @menuitem: The #IdoScaleMenuItem emitting the signal.
329 *
330 * The ::slider-released signal is emitted when the pointer releases the slider.
331 */
320 signals[SLIDER_RELEASED] = g_signal_new ("slider-released",332 signals[SLIDER_RELEASED] = g_signal_new ("slider-released",
321 G_OBJECT_CLASS_TYPE (gobject_class),333 G_OBJECT_CLASS_TYPE (gobject_class),
322 G_SIGNAL_RUN_FIRST,334 G_SIGNAL_RUN_FIRST,
@@ -325,6 +337,12 @@
325 g_cclosure_marshal_VOID__VOID,337 g_cclosure_marshal_VOID__VOID,
326 G_TYPE_NONE, 0);338 G_TYPE_NONE, 0);
327339
340 /**
341 * IdoScaleMenuItem::primary-clicked:
342 * @menuitem: The #IdoScaleMenuItem emitting the signal.
343 *
344 * The ::primary-clicked signal is emitted when the pointer clicks the primary label.
345 */
328 signals[PRIMARY_CLICKED] = g_signal_new ("primary-clicked",346 signals[PRIMARY_CLICKED] = g_signal_new ("primary-clicked",
329 G_TYPE_FROM_CLASS (item_class),347 G_TYPE_FROM_CLASS (item_class),
330 G_SIGNAL_RUN_FIRST | G_SIGNAL_NO_RECURSE | G_SIGNAL_NO_HOOKS,348 G_SIGNAL_RUN_FIRST | G_SIGNAL_NO_RECURSE | G_SIGNAL_NO_HOOKS,
@@ -334,6 +352,12 @@
334 G_TYPE_NONE, /* return type */352 G_TYPE_NONE, /* return type */
335 0 /* n_params */);353 0 /* n_params */);
336354
355 /**
356 * IdoScaleMenuItem::secondary-clicked:
357 * @menuitem: The #IdoScaleMenuItem emitting the signal.
358 *
359 * The ::secondary-clicked signal is emitted when the pointer clicks the secondary label.
360 */
337 signals[SECONDARY_CLICKED] = g_signal_new ("secondary-clicked",361 signals[SECONDARY_CLICKED] = g_signal_new ("secondary-clicked",
338 G_TYPE_FROM_CLASS (item_class),362 G_TYPE_FROM_CLASS (item_class),
339 G_SIGNAL_RUN_FIRST | G_SIGNAL_NO_RECURSE | G_SIGNAL_NO_HOOKS,363 G_SIGNAL_RUN_FIRST | G_SIGNAL_NO_RECURSE | G_SIGNAL_NO_HOOKS,
@@ -625,9 +649,10 @@
625 * @label: the text of the new menu item.649 * @label: the text of the new menu item.
626 * @size: The size style of the range.650 * @size: The size style of the range.
627 * @adjustment: A #GtkAdjustment describing the slider value.651 * @adjustment: A #GtkAdjustment describing the slider value.
628 * @returns: a new #IdoScaleMenuItem.
629 *652 *
630 * Creates a new #IdoScaleMenuItem with an empty label.653 * Creates a new #IdoScaleMenuItem with an empty label.
654 *
655 * Return Value: a new #IdoScaleMenuItem.
631 **/656 **/
632GtkWidget*657GtkWidget*
633ido_scale_menu_item_new (const gchar *label,658ido_scale_menu_item_new (const gchar *label,
@@ -647,9 +672,10 @@
647 * @min: The minimum value of the slider.672 * @min: The minimum value of the slider.
648 * @max: The maximum value of the slider.673 * @max: The maximum value of the slider.
649 * @step: The step increment of the slider.674 * @step: The step increment of the slider.
650 * @returns: a new #IdoScaleMenuItem.
651 *675 *
652 * Creates a new #IdoScaleMenuItem containing a label.676 * Creates a new #IdoScaleMenuItem containing a label.
677 *
678 * Return Value: a new #IdoScaleMenuItem.
653 **/679 **/
654GtkWidget*680GtkWidget*
655ido_scale_menu_item_new_with_range (const gchar *label,681ido_scale_menu_item_new_with_range (const gchar *label,
@@ -671,9 +697,10 @@
671/**697/**
672 * ido_scale_menu_item_get_scale:698 * ido_scale_menu_item_get_scale:
673 * @menuitem: The #IdoScaleMenuItem699 * @menuitem: The #IdoScaleMenuItem
674 * @returns: A pointer to the scale widget.
675 *700 *
676 * Retrieves the scale widget.701 * Retrieves the scale widget.
702 *
703 * Return Value: (transfer none): The #IdoRange in this item
677 **/704 **/
678GtkWidget*705GtkWidget*
679ido_scale_menu_item_get_scale (IdoScaleMenuItem *menuitem)706ido_scale_menu_item_get_scale (IdoScaleMenuItem *menuitem)
@@ -690,10 +717,11 @@
690/**717/**
691 * ido_scale_menu_item_get_style:718 * ido_scale_menu_item_get_style:
692 * @menuitem: The #IdoScaleMenuItem719 * @menuitem: The #IdoScaleMenuItem
693 * @returns: A #IdoScaleMenuItemStyle enum describing the style.
694 *720 *
695 * Retrieves the type of widgets being used for the primary and721 * Retrieves the type of widgets being used for the primary and
696 * secondary widget slots. This could be images, labels, or nothing.722 * secondary widget slots. This could be images, labels, or nothing.
723 *
724 * Return Value: A #IdoScaleMenuItemStyle enum describing the style.
697 **/725 **/
698IdoScaleMenuItemStyle726IdoScaleMenuItemStyle
699ido_scale_menu_item_get_style (IdoScaleMenuItem *menuitem)727ido_scale_menu_item_get_style (IdoScaleMenuItem *menuitem)
@@ -707,6 +735,14 @@
707 return priv->style;735 return priv->style;
708}736}
709737
738/**
739 * ido_scale_menu_item_set_style:
740 * @menuitem: The #IdoScaleMenuItem
741 * @style: Set the style use for the primary and secondary widget slots.
742 *
743 * Sets the type of widgets being used for the primary and
744 * secondary widget slots. This could be images, labels, or nothing.
745 **/
710void746void
711ido_scale_menu_item_set_style (IdoScaleMenuItem *menuitem,747ido_scale_menu_item_set_style (IdoScaleMenuItem *menuitem,
712 IdoScaleMenuItemStyle style)748 IdoScaleMenuItemStyle style)
@@ -725,11 +761,12 @@
725/**761/**
726 * ido_scale_menu_item_get_primary_image:762 * ido_scale_menu_item_get_primary_image:
727 * @menuitem: The #IdoScaleMenuItem763 * @menuitem: The #IdoScaleMenuItem
728 * @returns: A #GtkWidget pointer for the primary image.
729 *764 *
730 * Retrieves a pointer to the image widget used in the primary slot.765 * Retrieves a pointer to the image widget used in the primary slot.
731 * Whether this is visible depends upon the return value from766 * Whether this is visible depends upon the return value from
732 * ido_scale_menu_item_get_style().767 * ido_scale_menu_item_get_style().
768 *
769 * Return Value: (transfer none): A #GtkWidget pointer for the primary image.
733 **/770 **/
734GtkWidget *771GtkWidget *
735ido_scale_menu_item_get_primary_image (IdoScaleMenuItem *menuitem)772ido_scale_menu_item_get_primary_image (IdoScaleMenuItem *menuitem)
@@ -746,11 +783,12 @@
746/**783/**
747 * ido_scale_menu_item_get_secondary_image:784 * ido_scale_menu_item_get_secondary_image:
748 * @menuitem: The #IdoScaleMenuItem785 * @menuitem: The #IdoScaleMenuItem
749 * @returns: A #GtkWidget pointer for the secondary image.
750 *786 *
751 * Retrieves a pointer to the image widget used in the secondary slot.787 * Retrieves a pointer to the image widget used in the secondary slot.
752 * Whether this is visible depends upon the return value from788 * Whether this is visible depends upon the return value from
753 * ido_scale_menu_item_get_style().789 * ido_scale_menu_item_get_style().
790 *
791 * Return Value: (transfer none): A #GtkWidget pointer for the secondary image.
754 **/792 **/
755GtkWidget *793GtkWidget *
756ido_scale_menu_item_get_secondary_image (IdoScaleMenuItem *menuitem)794ido_scale_menu_item_get_secondary_image (IdoScaleMenuItem *menuitem)
@@ -767,11 +805,12 @@
767/**805/**
768 * ido_scale_menu_item_get_primary_label:806 * ido_scale_menu_item_get_primary_label:
769 * @menuitem: The #IdoScaleMenuItem807 * @menuitem: The #IdoScaleMenuItem
770 * @returns: A const gchar* string of the label text.
771 *808 *
772 * Retrieves a string of the text for the primary label widget.809 * Retrieves a string of the text for the primary label widget.
773 * Whether this is visible depends upon the return value from810 * Whether this is visible depends upon the return value from
774 * ido_scale_menu_item_get_style().811 * ido_scale_menu_item_get_style().
812 *
813 * Return Value: The label text.
775 **/814 **/
776const gchar*815const gchar*
777ido_scale_menu_item_get_primary_label (IdoScaleMenuItem *menuitem)816ido_scale_menu_item_get_primary_label (IdoScaleMenuItem *menuitem)
@@ -786,13 +825,14 @@
786}825}
787826
788/**827/**
789 * ido_scale_menu_item_get_primary_label:828 * ido_scale_menu_item_get_secondary_label:
790 * @menuitem: The #IdoScaleMenuItem829 * @menuitem: The #IdoScaleMenuItem
791 * @returns: A const gchar* string of the label text.
792 *830 *
793 * Retrieves a string of the text for the primary label widget.831 * Retrieves a string of the text for the secondary label widget.
794 * Whether this is visible depends upon the return value from832 * Whether this is visible depends upon the return value from
795 * ido_scale_menu_item_get_style().833 * ido_scale_menu_item_get_style().
834 *
835 * Return Value: The label text.
796 **/836 **/
797const gchar*837const gchar*
798ido_scale_menu_item_get_secondary_label (IdoScaleMenuItem *menuitem)838ido_scale_menu_item_get_secondary_label (IdoScaleMenuItem *menuitem)
@@ -809,7 +849,7 @@
809/**849/**
810 * ido_scale_menu_item_set_primary_label:850 * ido_scale_menu_item_set_primary_label:
811 * @menuitem: The #IdoScaleMenuItem851 * @menuitem: The #IdoScaleMenuItem
812 * @label: A string containing the label text852 * @label: The label text
813 *853 *
814 * Sets the text for the label widget in the primary slot. This854 * Sets the text for the label widget in the primary slot. This
815 * widget will only be visibile if the return value of855 * widget will only be visibile if the return value of
@@ -832,11 +872,11 @@
832}872}
833873
834/**874/**
835 * ido_scale_menu_item_set_primary_label:875 * ido_scale_menu_item_set_secondary_label:
836 * @menuitem: The #IdoScaleMenuItem876 * @menuitem: The #IdoScaleMenuItem
837 * @label: A string containing the label text877 * @label: The label text
838 *878 *
839 * Sets the text for the label widget in the primary slot. This879 * Sets the text for the label widget in the secondary slot. This
840 * widget will only be visibile if the return value of880 * widget will only be visibile if the return value of
841 * ido_scale_menu_item_get_style() is set to %IDO_SCALE_MENU_ITEM_STYLE_LABEL.881 * ido_scale_menu_item_get_style() is set to %IDO_SCALE_MENU_ITEM_STYLE_LABEL.
842 **/882 **/
@@ -859,16 +899,16 @@
859/**899/**
860 * ido_scale_menu_item_primary_clicked:900 * ido_scale_menu_item_primary_clicked:
861 * @menuitem: the #IdoScaleMenuItem901 * @menuitem: the #IdoScaleMenuItem
862 * 902 *
863 * Emits the "primary-clicked" signal.903 * Emits the "primary-clicked" signal.
864 *904 *
865 * The default handler for this signal lowers the scale's905 * The default handler for this signal lowers the scale's
866 * adjustment to its lower bound.906 * adjustment to its lower bound.
867 */907 */
868void908void
869ido_scale_menu_item_primary_clicked (IdoScaleMenuItem * item)909ido_scale_menu_item_primary_clicked (IdoScaleMenuItem * menuitem)
870{910{
871 g_signal_emit (item, signals[PRIMARY_CLICKED], 0);911 g_signal_emit (menuitem, signals[PRIMARY_CLICKED], 0);
872}912}
873static void913static void
874default_primary_clicked_handler (IdoScaleMenuItem * item)914default_primary_clicked_handler (IdoScaleMenuItem * item)
@@ -880,18 +920,18 @@
880}920}
881921
882/**922/**
883 * ido_scale_menu_item_primary_clicked:923 * ido_scale_menu_item_secondary_clicked:
884 * @menuitem: the #IdoScaleMenuItem924 * @menuitem: the #IdoScaleMenuItem
885 * 925 *
886 * Emits the "primary-clicked" signal.926 * Emits the "secondary-clicked" signal.
887 *927 *
888 * The default handler for this signal raises the scale's928 * The default handler for this signal raises the scale's
889 * adjustment to its upper bound.929 * adjustment to its upper bound.
890 */930 */
891void931void
892ido_scale_menu_item_secondary_clicked (IdoScaleMenuItem * item)932ido_scale_menu_item_secondary_clicked (IdoScaleMenuItem * menuitem)
893{933{
894 g_signal_emit (item, signals[SECONDARY_CLICKED], 0);934 g_signal_emit (menuitem, signals[SECONDARY_CLICKED], 0);
895}935}
896static void936static void
897default_secondary_clicked_handler (IdoScaleMenuItem * item)937default_secondary_clicked_handler (IdoScaleMenuItem * item)
898938
=== modified file 'src/idoscalemenuitem.h'
--- src/idoscalemenuitem.h 2012-03-10 06:04:36 +0000
+++ src/idoscalemenuitem.h 2012-12-15 07:41:19 +0000
@@ -61,8 +61,8 @@
61 GtkMenuItemClass parent_class;61 GtkMenuItemClass parent_class;
6262
63 /* signal default handlers */63 /* signal default handlers */
64 void (*primary_clicked)(IdoScaleMenuItem * self);64 void (*primary_clicked)(IdoScaleMenuItem * menuitem);
65 void (*secondary_clicked)(IdoScaleMenuItem * self);65 void (*secondary_clicked)(IdoScaleMenuItem * menuitem);
66};66};
6767
6868
6969
=== modified file 'src/idoswitchmenuitem.c'
--- src/idoswitchmenuitem.c 2012-08-21 21:43:49 +0000
+++ src/idoswitchmenuitem.c 2012-12-15 07:41:19 +0000
@@ -101,16 +101,27 @@
101 return TRUE; /* stop the event so that it doesn't trigger popdown() */101 return TRUE; /* stop the event so that it doesn't trigger popdown() */
102}102}
103103
104/***104/**
105**** Public API105 * ido_switch_menu_item_new:
106***/106 *
107107 * Creates a new #IdoSwitchMenuItem
108 *
109 * Return Value: a new #IdoSwitchMenuItem.
110 **/
108GtkWidget *111GtkWidget *
109ido_switch_menu_item_new (void)112ido_switch_menu_item_new (void)
110{113{
111 return g_object_new (IDO_TYPE_SWITCH_MENU_ITEM, NULL);114 return g_object_new (IDO_TYPE_SWITCH_MENU_ITEM, NULL);
112}115}
113116
117/**
118 * ido_switch_menu_item_get_content_area:
119 * @item: The #IdoSwitchMenuItem.
120 *
121 * Get the #GtkContainer to add additional widgets into.
122 *
123 * Return Value: (transfer none): The #GtkContainer to add additional widgets into.
124 **/
114GtkContainer *125GtkContainer *
115ido_switch_menu_item_get_content_area (IdoSwitchMenuItem * item)126ido_switch_menu_item_get_content_area (IdoSwitchMenuItem * item)
116{127{
117128
=== modified file 'src/idotimeline.c'
--- src/idotimeline.c 2011-06-01 19:36:43 +0000
+++ src/idotimeline.c 2012-12-15 07:41:19 +0000
@@ -132,6 +132,12 @@
132 GDK_TYPE_SCREEN,132 GDK_TYPE_SCREEN,
133 G_PARAM_READWRITE));133 G_PARAM_READWRITE));
134134
135 /**
136 * IdoTimeline::started:
137 * @timeline: The #IdoTimeline emitting the signal.
138 *
139 * The ::started signal is emitted when the timeline starts.
140 */
135 signals[STARTED] =141 signals[STARTED] =
136 g_signal_new ("started",142 g_signal_new ("started",
137 G_TYPE_FROM_CLASS (object_class),143 G_TYPE_FROM_CLASS (object_class),
@@ -141,6 +147,12 @@
141 g_cclosure_marshal_VOID__VOID,147 g_cclosure_marshal_VOID__VOID,
142 G_TYPE_NONE, 0);148 G_TYPE_NONE, 0);
143149
150 /**
151 * IdoTimeline::paused:
152 * @timeline: The #IdoTimeline emitting the signal.
153 *
154 * The ::paused signal is emitted when the timeline pauses.
155 */
144 signals[PAUSED] =156 signals[PAUSED] =
145 g_signal_new ("paused",157 g_signal_new ("paused",
146 G_TYPE_FROM_CLASS (object_class),158 G_TYPE_FROM_CLASS (object_class),
@@ -150,6 +162,12 @@
150 g_cclosure_marshal_VOID__VOID,162 g_cclosure_marshal_VOID__VOID,
151 G_TYPE_NONE, 0);163 G_TYPE_NONE, 0);
152164
165 /**
166 * IdoTimeline::finished:
167 * @timeline: The #IdoTimeline emitting the signal.
168 *
169 * The ::paused signal is emitted when the timeline finishes.
170 */
153 signals[FINISHED] =171 signals[FINISHED] =
154 g_signal_new ("finished",172 g_signal_new ("finished",
155 G_TYPE_FROM_CLASS (object_class),173 G_TYPE_FROM_CLASS (object_class),
@@ -159,6 +177,13 @@
159 g_cclosure_marshal_VOID__VOID,177 g_cclosure_marshal_VOID__VOID,
160 G_TYPE_NONE, 0);178 G_TYPE_NONE, 0);
161179
180 /**
181 * IdoTimeline::frame:
182 * @timeline: The #IdoTimeline emitting the signal.
183 * @progress: The progress position for this frame from 0.0 (start) to 1.0 (end).
184 *
185 * The ::frame signal is emitted when a frame should be drawn.
186 */
162 signals[FRAME] =187 signals[FRAME] =
163 g_signal_new ("frame",188 g_signal_new ("frame",
164 G_TYPE_FROM_CLASS (object_class),189 G_TYPE_FROM_CLASS (object_class),
@@ -342,6 +367,15 @@
342 NULL);367 NULL);
343}368}
344369
370/**
371 * ido_timeline_new_for_screen:
372 * @duration: duration in milliseconds for the timeline
373 * @screen: Screen to start on.
374 *
375 * Creates a new #IdoTimeline with the specified number of frames on the given screen.
376 *
377 * Return Value: the newly created #IdoTimeline
378 **/
345IdoTimeline *379IdoTimeline *
346ido_timeline_new_for_screen (guint duration,380ido_timeline_new_for_screen (guint duration,
347 GdkScreen *screen)381 GdkScreen *screen)
@@ -573,6 +607,13 @@
573 }607 }
574}608}
575609
610/**
611 * ido_timeline_set_duration:
612 * @timeline: A #IdoTimeline
613 * @duration: Duration in milliseconds.
614 *
615 * Set the animation duration.
616 */
576void617void
577ido_timeline_set_duration (IdoTimeline *timeline,618ido_timeline_set_duration (IdoTimeline *timeline,
578 guint duration)619 guint duration)
@@ -590,6 +631,14 @@
590 }631 }
591}632}
592633
634/**
635 * ido_timeline_get_duration:
636 * @timeline: A #IdoTimeline
637 *
638 * Set the animation duration.
639 *
640 * Return Value: Duration in milliseconds.
641 */
593guint642guint
594ido_timeline_get_duration (IdoTimeline *timeline)643ido_timeline_get_duration (IdoTimeline *timeline)
595{644{
@@ -645,6 +694,13 @@
645 return priv->direction;694 return priv->direction;
646}695}
647696
697/**
698 * ido_timeline_set_screen:
699 * @timeline: A #IdoTimeline
700 * @screen: A #GdkScreen to use
701 *
702 * Set the screen the timeline is running on.
703 */
648void704void
649ido_timeline_set_screen (IdoTimeline *timeline,705ido_timeline_set_screen (IdoTimeline *timeline,
650 GdkScreen *screen)706 GdkScreen *screen)
@@ -664,6 +720,14 @@
664 g_object_notify (G_OBJECT (timeline), "screen");720 g_object_notify (G_OBJECT (timeline), "screen");
665}721}
666722
723/**
724 * ido_timeline_get_screen:
725 * @timeline: A #IdoTimeline
726 *
727 * Get the screen this timeline is running on.
728 *
729 * Return Value: (transfer none): The #GdkScreen this timeline is running on.
730 */
667GdkScreen *731GdkScreen *
668ido_timeline_get_screen (IdoTimeline *timeline)732ido_timeline_get_screen (IdoTimeline *timeline)
669{733{
@@ -675,6 +739,14 @@
675 return priv->screen;739 return priv->screen;
676}740}
677741
742/**
743 * ido_timeline_get_progress:
744 * @timeline: A #IdoTimeline
745 *
746 * Get the progress on the timeline.
747 *
748 * Return Value: The progress from 0.0 (start) to 1.0 (end)
749 */
678gdouble750gdouble
679ido_timeline_get_progress (IdoTimeline *timeline)751ido_timeline_get_progress (IdoTimeline *timeline)
680{752{
@@ -686,6 +758,13 @@
686 return priv->progress;758 return priv->progress;
687}759}
688760
761/**
762 * ido_timeline_set_progress:
763 * @timeline: A #IdoTimeline
764 * @progress: The progress from 0.0 (start) to 1.0 (end)
765 *
766 * Set the progress on the timeline.
767 */
689void768void
690ido_timeline_set_progress (IdoTimeline *timeline, gdouble progress)769ido_timeline_set_progress (IdoTimeline *timeline, gdouble progress)
691{770{
@@ -707,6 +786,15 @@
707 ido_timeline_start (timeline);786 ido_timeline_start (timeline);
708}787}
709788
789/**
790 * ido_timeline_calculate_progress:
791 * @linear_progress: The progress from 0.0 (start) to 1.0 (end)
792 * @progress_type: The progress transform to apply
793 *
794 * Transform a linear progress position using the given transform.
795 *
796 * Return Value: the progress position using the provided transform.
797 */
710gdouble798gdouble
711ido_timeline_calculate_progress (gdouble linear_progress,799ido_timeline_calculate_progress (gdouble linear_progress,
712 IdoTimelineProgressType progress_type)800 IdoTimelineProgressType progress_type)

Subscribers

People subscribed via source and target branches