← Back to team overview

ayatana-commits team mailing list archive

Re: [Merge] lp:~karl-qdh/indicator-datetime/calendarmenuitemsignals into lp:indicator-datetime

 

> > +             // TODO This needs to be an array of 3 ints
> 
> Confused here... use an array of 3 ints then? :)

This isn't actually used as there was an ido branch I was working on that hadn't been merged. 


> 
> > +static void
> > +day_selected_double_click_cb (IdoCalendarMenuItem *ido,
> > +                                           guint           day,
> > +                              gpointer        user_data)
> > +{
> > +     gchar datestring[20];
> > +     guint d,m,y;
> > +     DbusmenuMenuitem * item = DBUSMENU_MENUITEM (user_data);
> > +     ido_calendar_menu_item_get_date(ido, &y, &m, &d);
> > +     g_sprintf(datestring, "%d-%d-%d", y, m, d);
> > +     GVariant *variant = g_variant_new_string(datestring);
> > +     guint timestamp = (guint)time(NULL);
> > +     dbusmenu_menuitem_handle_event(DBUSMENU_MENUITEM(item), "day-selected-
> double-click", variant, timestamp);
> > +     g_debug("Got day-selected-double-click signal: %s", datestring);
> > +}
> > +*/
> 
> Why are you encoding the data into a string instead of just passing an
> array of ints?  Seems it would be better to let GVariant do the encoding
> for us.

I _was_ encoding to a string, but I changed it, the month-changed signal being the only one libido actually supported at the time.


> 
> > +     dbusmenu_gtkclient_newitem_base(DBUSMENU_GTKCLIENT(client), newitem,
> GTK_MENU_ITEM(ido), parent);
> > +     /*g_signal_connect_after(ido, "day-selected",
> G_CALLBACK(day_selected_cb), (gpointer)newitem);
> > +     dbusmenu_gtkclient_newitem_base(DBUSMENU_GTKCLIENT(client), newitem,
> GTK_MENU_ITEM(ido), parent);
> > +     g_signal_connect_after(ido, "day-selected-double-click",
> G_CALLBACK(day_selected_double_click_cb), (gpointer)newitem);*/
> 
> _newitem_base() should only need to be called once here.

True

>   review needsfixing



-- 
https://code.launchpad.net/~karl-qdh/indicator-datetime/calendarmenuitemsignals/+merge/52570
Your team ayatana-commits is subscribed to branch lp:indicator-datetime.



References