From: Alexandru C. <cs...@us...> - 2009-04-18 15:08:07
|
Update of /cvsroot/groundstation/grig2/src In directory ddv4jf1.ch3.sourceforge.com:/tmp/cvs-serv17018 Modified Files: rig-selector.c Log Message: Changed to new tooltip API. Index: rig-selector.c =================================================================== RCS file: /cvsroot/groundstation/grig2/src/rig-selector.c,v retrieving revision 1.14 retrieving revision 1.15 diff -C2 -d -r1.14 -r1.15 *** rig-selector.c 6 Jan 2008 00:36:19 -0000 1.14 --- rig-selector.c 18 Apr 2009 15:07:53 -0000 1.15 *************** *** 98,102 **** GtkWidget *delbut; /* delete button */ GtkWidget *swin; - GtkTooltips *tips; GtkTreeSelection *sel; --- 98,101 ---- *************** *** 111,122 **** gtk_tree_selection_set_mode (sel, GTK_SELECTION_SINGLE); - tips = gtk_tooltips_new (); - /* connect button */ conbut = gtk_button_new_from_stock (GTK_STOCK_CONNECT); gtk_widget_set_sensitive (conbut, FALSE); ! gtk_tooltips_set_tip (tips, conbut, ! _("Connect to the selected radio."), ! _("Grig will attempt to establish connection to the " "selected radio using the specified settings. If " "the connection is successful, the main application " --- 110,119 ---- gtk_tree_selection_set_mode (sel, GTK_SELECTION_SINGLE); /* connect button */ conbut = gtk_button_new_from_stock (GTK_STOCK_CONNECT); gtk_widget_set_sensitive (conbut, FALSE); ! gtk_widget_set_tooltip_text (conbut, ! _("Connect to the selected radio." ! "Grig will attempt to establish connection to the " "selected radio using the specified settings. If " "the connection is successful, the main application " *************** *** 125,137 **** /* cancel button */ cancbut = gtk_button_new_from_stock (GTK_STOCK_CANCEL); ! gtk_tooltips_set_tip (tips, cancbut, ! _("Cancel radio selection."), _("Cancel radio selection. This will end grig.")); /* add button */ newbut = gtk_button_new_from_stock (GTK_STOCK_ADD); ! gtk_tooltips_set_tip (tips, newbut, ! _("Add a new radio to the list."), ! _("A new configuration window will be shown allowing " "you to select a radio and specify the connection " "settings.")); --- 122,133 ---- /* cancel button */ cancbut = gtk_button_new_from_stock (GTK_STOCK_CANCEL); ! gtk_widget_set_tooltip_text (cancbut, _("Cancel radio selection. This will end grig.")); /* add button */ newbut = gtk_button_new_from_stock (GTK_STOCK_ADD); ! gtk_widget_set_tooltip_text (newbut, ! _("Add a new radio to the list." ! "A new configuration window will be shown allowing " "you to select a radio and specify the connection " "settings.")); *************** *** 140,152 **** delbut = gtk_button_new_from_stock (GTK_STOCK_DELETE); gtk_widget_set_sensitive (delbut, FALSE); ! gtk_tooltips_set_tip (tips, delbut, ! _("Delete the currently selected radio."), NULL); /* edit button */ editbut = gtk_button_new_from_stock (GTK_STOCK_EDIT); gtk_widget_set_sensitive (editbut, FALSE); ! gtk_tooltips_set_tip (tips, editbut, ! _("Edit the settings for the currently selected radio."), ! NULL); /* button box*/ --- 136,147 ---- delbut = gtk_button_new_from_stock (GTK_STOCK_DELETE); gtk_widget_set_sensitive (delbut, FALSE); ! gtk_widget_set_tooltip_text (delbut, ! _("Delete the currently selected radio.")); /* edit button */ editbut = gtk_button_new_from_stock (GTK_STOCK_EDIT); gtk_widget_set_sensitive (editbut, FALSE); ! gtk_widget_set_tooltip_text (editbut, ! _("Edit the settings for the currently selected radio.")); /* button box*/ *************** *** 504,507 **** --- 499,503 ---- static void add (GtkWidget *button, gpointer data) { + g_print ("TO BE IMPLEMENTED\n"); } *************** *** 509,512 **** --- 505,509 ---- static void edit (GtkWidget *button, gpointer data) { + g_print ("TO BE IMPLEMENTED\n"); } *************** *** 529,532 **** --- 526,539 ---- gtk_tree_model_get (model, &iter, 3, &id, -1); + /* set selection */ + if (selected) { + g_free (selected); + selected = NULL; + } + if (havesel) { + gtk_tree_model_get (model, &iter, 0, &selected, -1); + g_print ("SEELCTED: %s\n", selected); + } + /* get buttons */ delbut = GTK_WIDGET (g_object_get_data (G_OBJECT(window), "delbut")); |