codeMonkey
|
2008-09-26
, 06:57
|
Posts: 755 |
Thanked: 406 times |
Joined on Feb 2008
@ UK
|
#51
|
The Following User Says Thank You to codeMonkey For This Useful Post: | ||
|
2008-09-28
, 05:23
|
|
Moderator |
Posts: 7,109 |
Thanked: 8,820 times |
Joined on Oct 2007
@ Vancouver, BC, Canada
|
#52
|
|
2009-06-05
, 07:12
|
|
Posts: 4,274 |
Thanked: 5,358 times |
Joined on Sep 2007
@ Looking at y'all and sighing
|
#53
|
--- large-statusbar-clock-0.7.orig/large-statusbar-clock-minutes.c +++ large-statusbar-clock-0.7/large-statusbar-clock-minutes.c @@ -46,6 +46,7 @@ void minutes_button_clicked(GtkButton *button, gpointer data); gboolean update_minutes(gpointer data); void launch_clock(GtkMenuItem *item, gpointer data); +void launch_datesettings(GtkMenuItem *item, gpointer data); void configure_clock(GtkMenuItem *item, gpointer data); void popup_place(GtkMenu *menu, gint *x, gint *y, gboolean *push_in, gpointer user_data); gint dbus_req_handler(const gchar* interface, const gchar* method, GArray* arguments, gpointer data, osso_rpc_t* retval); @@ -358,6 +359,12 @@ gtk_menu_shell_append(GTK_MENU_SHELL(statusbar_plugin->minutesMenu), menu_item); } + + menu_item = gtk_menu_item_new_with_label("Date and time settings..."); + g_signal_connect(menu_item, "activate", G_CALLBACK(launch_datesettings),statusbar_plugin); + gtk_widget_show_all(menu_item); + gtk_menu_shell_append(GTK_MENU_SHELL(statusbar_plugin->minutesMenu), menu_item); + menu_item = gtk_menu_item_new_with_label("Configure"); g_signal_connect(menu_item, "activate", G_CALLBACK(configure_clock),statusbar_plugin); gtk_widget_show_all(menu_item); @@ -396,6 +403,26 @@ osso_deinitialize(context); } +void launch_datesettings(GtkMenuItem *item, gpointer data) +{ + osso_context_t *context; + osso_return_t ret; + + context = osso_initialize("toptest", "0.1", TRUE, NULL); + if (context == NULL) + { + printf("could not connect to D-Bus\n"); + } + ret = osso_cp_plugin_execute(context, "libcpdatetime.so", data, TRUE); + + if (ret != OSSO_OK) + { + printf("ERROR!\n"); + } + + osso_deinitialize(context); +} + void toggle_alarms(GtkToggleButton *button, GtkVBox *box) { if (gtk_toggle_button_get_active(button))
The Following User Says Thank You to qwerty12 For This Useful Post: | ||
|
2009-06-05
, 14:38
|
|
Posts: 475 |
Thanked: 771 times |
Joined on Dec 2007
@ Hamilton, Ontario, Canada
|
#54
|
The Following User Says Thank You to fiferboy For This Useful Post: | ||
|
2009-06-05
, 16:51
|
|
Posts: 203 |
Thanked: 61 times |
Joined on May 2008
|
#55
|