static GtkWidget *plugin_config_frame(PurplePlugin *plugin) { GtkWidget *frame; GtkWidget *vbox, *vbox2; GtkSizeGroup *sg; GtkWidget *dd; frame = gtk_vbox_new(FALSE, 18); gtk_container_set_border_width(GTK_CONTAINER(frame), 12); vbox = pidgin_make_frame(frame, "Inform about unread..."); sg = gtk_size_group_new(GTK_SIZE_GROUP_HORIZONTAL); dd = pidgin_prefs_dropdown(vbox, "LED:", PURPLE_PREF_STRING, "/plugins/gtk/ftdi-hwnotify/led-one", "None", "none", "Blue", "blue", "Red", "red", "Green", "green", NULL); gtk_size_group_add_widget(sg, dd); dd = pidgin_prefs_dropdown(vbox, "Instant Messages:", PURPLE_PREF_STRING, "/plugins/gtk/ftdi-hwnotify/im", "Never", "never", "In hidden conversations", "hidden", "Always", "always", NULL); gtk_size_group_add_widget(sg, dd); dd = pidgin_prefs_dropdown(vbox, "Chat Messages:", PURPLE_PREF_STRING, "/plugins/gtk/ftdi-hwnotify/chat", "Never", "never", "When my nick is said", "nick", "Always", "always", NULL); gtk_size_group_add_widget(sg, dd); vbox2 = pidgin_make_frame(frame, "Important contacts..."); sg = gtk_size_group_new(GTK_SIZE_GROUP_HORIZONTAL); dd = pidgin_prefs_dropdown(vbox2, "LED:", PURPLE_PREF_STRING, "/plugins/gtk/ftdi-hwnotify/led-imp", "None", "none", "Blue", "blue", "Red", "red", "Green", "green", NULL); gtk_size_group_add_widget(sg, dd); pidgin_prefs_labeled_entry (vbox2, "Contacts:", "/plugins/gtk/ftdi-hwnotify/contacts-imp", sg); gtk_widget_show_all(frame); return frame; }
/*---------------------------------------------------------------------------- * Behavior Tab *--------------------------------------------------------------------------*/ void ap_gtk_prefs_add_summary_option (GtkWidget *widget) { pidgin_prefs_dropdown (widget, "Show AutoProfile summary window", PURPLE_PREF_STRING, "/plugins/gtk/autoprofile/show_summary", "Always", "always", "When away", "away", "Never", "never", NULL); }
static GtkWidget* get_config_frame(PurplePlugin *plugin) { GtkWidget *ret; GtkWidget *vbox; GtkWidget *button; char *gtk_version = NULL; char *run_key_val; char *tmp; ret = gtk_vbox_new(FALSE, 18); gtk_container_set_border_width(GTK_CONTAINER(ret), 12); gtk_version = g_strdup_printf("GTK+\t%u.%u.%u\nGlib\t%u.%u.%u", gtk_major_version, gtk_minor_version, gtk_micro_version, glib_major_version, glib_minor_version, glib_micro_version); /* Display Installed GTK+ Runtime Version */ if(gtk_version) { GtkWidget *label; vbox = pidgin_make_frame(ret, _("GTK+ Runtime Version")); label = gtk_label_new(gtk_version); gtk_box_pack_start(GTK_BOX(vbox), label, FALSE, FALSE, 0); gtk_widget_show(label); g_free(gtk_version); } /* Autostart */ vbox = pidgin_make_frame(ret, _("Startup")); tmp = g_strdup_printf(_("_Start %s on Windows startup"), PIDGIN_NAME); button = gtk_check_button_new_with_mnemonic(tmp); g_free(tmp); gtk_box_pack_start(GTK_BOX(vbox), button, FALSE, FALSE, 0); if ((run_key_val = wpurple_read_reg_string(HKEY_CURRENT_USER, RUNKEY, "Pidgin")) || (run_key_val = wpurple_read_reg_string(HKEY_LOCAL_MACHINE, RUNKEY, "Pidgin"))) { gtk_toggle_button_set_active(GTK_TOGGLE_BUTTON(button), TRUE); g_free(run_key_val); } g_signal_connect(G_OBJECT(button), "clicked", G_CALLBACK(winprefs_set_autostart), NULL); gtk_widget_show(button); /* Buddy List */ vbox = pidgin_make_frame(ret, _("Buddy List")); pidgin_prefs_checkbox(_("_Dockable Buddy List"), PREF_DBLIST_DOCKABLE, vbox); /* Blist On Top */ pidgin_prefs_dropdown(vbox, _("_Keep Buddy List window on top:"), PURPLE_PREF_INT, PREF_BLIST_ON_TOP, _("Never"), BLIST_TOP_NEVER, _("Always"), BLIST_TOP_ALWAYS, /* XXX: Did this ever work? */ _("Only when docked"), BLIST_TOP_DOCKED, NULL); gtk_widget_show_all(ret); return ret; }
static GtkWidget *plugin_config_frame(PurplePlugin *plugin) { GtkWidget *frame; GtkWidget *vbox; GtkWidget *vbox2; GtkSizeGroup *sg; GtkWidget *dd; GtkWidget *ent; frame = gtk_vbox_new(FALSE, 18); gtk_container_set_border_width(GTK_CONTAINER(frame), 12); vbox = pidgin_make_frame(frame, "Inform about unread..."); vbox2 = pidgin_make_frame(frame, "Hardware setup:"); sg = gtk_size_group_new(GTK_SIZE_GROUP_HORIZONTAL); dd = pidgin_prefs_dropdown(vbox, "Instant Messages:", PURPLE_PREF_STRING, "/plugins/gtk/gtk-sarah-barnot/im", "Never", "never", "In hidden conversations", "hidden", "Always", "always", NULL); gtk_size_group_add_widget(sg, dd); dd = pidgin_prefs_dropdown(vbox, "Chat Messages:", PURPLE_PREF_STRING, "/plugins/gtk/gtk-sarah-barnot/chat", "Never", "never", "When my nick is said", "nick", "Always", "always", NULL); gtk_size_group_add_widget(sg, dd); ent=pidgin_prefs_labeled_entry(vbox2,"File to be displayed on xmobar:", "/plugins/gtk/gtk-sarah-barnot/filename",sg); gtk_widget_show_all(frame); return frame; }
static GtkWidget *get_autoreply_page () { GtkWidget *page; GtkWidget *label, *checkbox, *spinner, *entry; GtkWidget *frame, *vbox, *large_vbox, *hbox; GtkWidget *dd; GtkSizeGroup *sg; /* Make the box */ page = gtk_vbox_new (FALSE, 8); gtk_container_set_border_width (GTK_CONTAINER (page), 12); frame = pidgin_make_frame(page, _("General")); dd = pidgin_prefs_dropdown(frame, _("Auto-reply:"), PURPLE_PREF_STRING, "/plugins/gtk/autoprofile/autorespond/auto_reply", _("Never"), "never", _("When away"), "away", _("When both away and idle"), "awayidle", NULL); sg = gtk_size_group_new (GTK_SIZE_GROUP_HORIZONTAL); gtk_size_group_add_widget(sg, dd); gtk_misc_set_alignment(GTK_MISC(dd), 0, 0.5); /*---------- Auto-responses ----------*/ frame = pidgin_make_frame (page, _("Dynamic auto-responses")); vbox = gtk_vbox_new (FALSE, 5); gtk_container_add (GTK_CONTAINER (frame), vbox); /* Auto-response activated */ checkbox = pidgin_prefs_checkbox ( _("Allow users to request more auto-responses"), "/plugins/gtk/autoprofile/autorespond/enable", vbox); large_vbox = gtk_vbox_new (FALSE, 5); gtk_box_pack_start (GTK_BOX (vbox), large_vbox, FALSE, FALSE, 0); /* Auto-response delay */ hbox = gtk_hbox_new (FALSE, 5); gtk_box_pack_start (GTK_BOX (large_vbox), hbox, FALSE, FALSE, 0); label = gtk_label_new (_("Delay")); gtk_box_pack_start (GTK_BOX (hbox), label, FALSE, FALSE, 0); spinner = gtk_spin_button_new_with_range (1, G_MAXINT, 1); gtk_box_pack_start (GTK_BOX (hbox), spinner, TRUE, TRUE, 0); label = gtk_label_new (_("seconds between auto-responses")); gtk_box_pack_start (GTK_BOX (hbox), label, FALSE, FALSE, 0); gtk_spin_button_set_value (GTK_SPIN_BUTTON (spinner), purple_prefs_get_int ( "/plugins/gtk/autoprofile/autorespond/delay")); g_signal_connect (G_OBJECT (spinner), "value-changed", G_CALLBACK (update_delay_respond), NULL); /* Auto-response message string */ label = gtk_label_new (_("Message sent with first autoresponse:")); gtk_box_pack_start (GTK_BOX (large_vbox), label, FALSE, FALSE, 0); gtk_misc_set_alignment (GTK_MISC (label), 0, 0); entry = gtk_entry_new (); gtk_box_pack_start (GTK_BOX (large_vbox), entry, FALSE, FALSE, 0); gtk_entry_set_max_length (GTK_ENTRY (entry), 100); gtk_entry_set_text (GTK_ENTRY (entry), purple_prefs_get_string ( "/plugins/gtk/autoprofile/autorespond/text")); g_signal_connect (G_OBJECT (entry), "focus-out-event", G_CALLBACK (update_behavior_string), "text_respond"); label = gtk_label_new (_("Request trigger message:")); gtk_box_pack_start (GTK_BOX (large_vbox), label, FALSE, FALSE, 0); gtk_misc_set_alignment (GTK_MISC (label), 0, 0); entry = gtk_entry_new (); gtk_box_pack_start (GTK_BOX (large_vbox), entry, FALSE, FALSE, 0); gtk_entry_set_max_length (GTK_ENTRY (entry), 50); gtk_entry_set_text (GTK_ENTRY (entry), purple_prefs_get_string ( "/plugins/gtk/autoprofile/autorespond/trigger")); g_signal_connect (G_OBJECT (entry), "focus-out-event", G_CALLBACK (update_behavior_string), "text_trigger"); /* Sensitivity signals */ g_signal_connect(G_OBJECT(checkbox), "clicked", G_CALLBACK(pidgin_toggle_sensitive), large_vbox); if (!purple_prefs_get_bool ("/plugins/gtk/autoprofile/autorespond/enable")) { gtk_widget_set_sensitive (large_vbox, FALSE); } else { gtk_widget_set_sensitive (large_vbox, TRUE); } return page; }