static void refreshLists() { short r, i, c, a; r = row2ref(gCurRow); // application number which lines are displayed if (r < 0) r = 0; gUpdateFlag=TRUE; gtk_clist_freeze(GTK_CLIST(gSrcList)); gtk_clist_freeze(GTK_CLIST(gAppList)); gtk_clist_freeze(GTK_CLIST(gDstList)); gtk_clist_unselect_all(GTK_CLIST(gAppList)); gtk_clist_unselect_all(GTK_CLIST(gSrcList)); gtk_clist_unselect_all(GTK_CLIST(gDstList)); for (i=0, c=MidiCountAppls(); i < c; i++) { a = row2ref(i); if (a == r) gtk_clist_select_row (GTK_CLIST(gAppList), i, 0); if (MidiIsConnected(a, r)) gtk_clist_select_row (GTK_CLIST(gSrcList), i, 0); if (MidiIsConnected(r, a)) gtk_clist_select_row (GTK_CLIST(gDstList), i, 0); } gtk_clist_thaw(GTK_CLIST(gSrcList)); gtk_clist_thaw(GTK_CLIST(gAppList)); gtk_clist_thaw(GTK_CLIST(gDstList)); gUpdateFlag=FALSE; }
void clist_select_rows(GtkWidget *clist, GList *rows) { GList *tmp; gint row; if (rows == NULL) { gtk_clist_select_row(GTK_CLIST(clist), 0, 0); GTK_CLIST(clist)->focus_row = 0; } else { for (tmp = rows; tmp != NULL; tmp = tmp->next) { row = (gint)tmp->data; if (row < GTK_CLIST(clist)->rows) { gtk_clist_select_row(GTK_CLIST(clist), row, 0); GTK_CLIST(clist)->focus_row = row; } else { gtk_clist_select_row(GTK_CLIST(clist), GTK_CLIST(clist)->rows-1, 0); GTK_CLIST(clist)->focus_row = GTK_CLIST(clist)->rows-1; } } } gtk_widget_draw_focus(clist); gtk_widget_grab_focus(clist); }
static void prefs_summary_column_remove(void) { GtkCList *stock_clist = GTK_CLIST(summary_col.stock_clist); GtkCList *shown_clist = GTK_CLIST(summary_col.shown_clist); gint row; SummaryColumnType type; gchar *name; if (!shown_clist->selection) return; row = GPOINTER_TO_INT(shown_clist->selection->data); type = GPOINTER_TO_INT(gtk_clist_get_row_data(shown_clist, row)); gtk_clist_remove(shown_clist, row); if (shown_clist->rows == row) gtk_clist_select_row(shown_clist, row - 1, -1); if (!stock_clist->selection) row = 0; else row = GPOINTER_TO_INT(stock_clist->selection->data) + 1; name = gettext(col_name[type]); row = gtk_clist_insert(stock_clist, row, (gchar **)&name); gtk_clist_set_row_data(stock_clist, row, GINT_TO_POINTER(type)); gtk_clist_select_row(stock_clist, row, -1); }
static void gtkSelectInCList(GtkWidget *list, char *item) { gint i; if ((i = gtkFindInCList(list, item)) > -1) gtk_clist_select_row(GTK_CLIST(list), i, 0); }
void DownloadUI::UpdateDownloadList(void) { if (!m_List || !isVisible) return; gtk_clist_freeze(GTK_CLIST(m_List)); gtk_clist_clear(GTK_CLIST(m_List)); uint32 iLoop = downloadList.size(); if (iLoop == 0) { gtk_clist_thaw(GTK_CLIST(m_List)); return; } for (uint32 i = 0; i < iLoop; i++) { DownloadItem *dli = downloadList[i]; char *iText[2]; string displayString = dli->GetMetaData().Title(); iText[0] = (char *)displayString.c_str(); iText[1] = (char *)StatusString(dli).c_str(); int row = gtk_clist_append(GTK_CLIST(m_List), iText); gtk_clist_set_row_data(GTK_CLIST(m_List), row, (gpointer)dli); } gtk_clist_select_row(GTK_CLIST(m_List), m_currentindex, 0); SelChangeEvent(m_currentindex); gtk_clist_thaw(GTK_CLIST(m_List)); }
static gint fontsel_set_style_by_name (StyleSelect *select) { FontFace *font_face = NULL; GtkCList *clist; gint row; g_return_val_if_fail (select != NULL, FALSE); font_face = g_tree_lookup (select->family, select->style_name); if (font_face) { clist = g_object_get_data (G_OBJECT (select->fontsel), "style_list"); row = gtk_clist_find_row_from_data (GTK_CLIST (clist), font_face); gtk_clist_select_row (GTK_CLIST (clist), row, 0); if ( !(gtk_clist_row_is_visible (clist, row) & GTK_VISIBILITY_FULL)) gtk_clist_moveto (clist, row, 0, 0.0, 0.0); } g_free (select); return FALSE; }
void selectallfiles (gpointer data) { gftp_window_data * wdata; gftp_file * tempfle; GList *templist; int i; wdata = data; wdata->show_selected = 0; gtk_clist_freeze (GTK_CLIST (wdata->listbox)); i = 0; templist = wdata->files; while (templist != NULL) { tempfle = (gftp_file *) templist->data; if (tempfle->shown) { if (S_ISDIR (tempfle->st_mode)) gtk_clist_unselect_row (GTK_CLIST (wdata->listbox), i, 0); else gtk_clist_select_row (GTK_CLIST (wdata->listbox), i, 0); i++; } templist = templist->next; } gtk_clist_thaw (GTK_CLIST (wdata->listbox)); }
/* This updates the file list to show (and select) a particular node * entry. The directory tree is also updated appropriately */ void filelist_show_entry( GNode *node ) { GNode *dnode; int row; /* Corresponding directory */ if (NODE_IS_DIR(node)) dnode = node; else dnode = node->parent; if (dnode != filelist_current_dnode) { /* Scroll directory tree to proper entry */ dirtree_entry_show( dnode ); } /* Scroll file list to proper entry */ row = gtk_clist_find_row_from_data( GTK_CLIST(file_clist_w), node ); if (row >= 0) gtk_clist_select_row( GTK_CLIST(file_clist_w), row, 0 ); else gtk_clist_unselect_all( GTK_CLIST(file_clist_w) ); gui_clist_moveto_row( file_clist_w, MAX(0, row), FILELIST_SCROLL_TIME ); }
int ftp_list_files (gftp_window_data * wdata) { gftpui_callback_data * cdata; gtk_label_set (GTK_LABEL (wdata->hoststxt), _("Receiving file names...")); cdata = g_malloc0 (sizeof (*cdata)); cdata->request = wdata->request; cdata->uidata = wdata; cdata->run_function = gftpui_common_run_ls; cdata->dont_refresh = 1; gftpui_common_run_callback_function (cdata); wdata->files = cdata->files; g_free (cdata); if (wdata->files == NULL || !GFTP_IS_CONNECTED (wdata->request)) { gftpui_disconnect (wdata); return (0); } wdata->sorted = 0; sortrows (GTK_CLIST (wdata->listbox), -1, (gpointer) wdata); if (IS_NONE_SELECTED (wdata)) gtk_clist_select_row (GTK_CLIST (wdata->listbox), 0, 0); return (1); }
static void prefs_display_items_add(GtkWidget *widget, gpointer data) { PrefsDisplayItemsDialog *dialog = data; GtkCList *stock_clist = GTK_CLIST(dialog->stock_clist); GtkCList *shown_clist = GTK_CLIST(dialog->shown_clist); PrefsDisplayItem *item; gint row; gchar *name; if (!stock_clist->selection) return; row = GPOINTER_TO_INT(stock_clist->selection->data); item = (PrefsDisplayItem *)gtk_clist_get_row_data(stock_clist, row); if (!item->allow_multiple) { gtk_clist_remove(stock_clist, row); if (stock_clist->rows == row) gtk_clist_select_row(stock_clist, row - 1, -1); } if (!shown_clist->selection) row = 0; else row = GPOINTER_TO_INT(shown_clist->selection->data); item->in_use = TRUE; name = gettext(item->label); row = gtk_clist_insert(shown_clist, row, (gchar **)&name); gtk_clist_set_row_data(shown_clist, row, item); prefs_display_items_set_sensitive(dialog); }
/* Callback for button press in the directory tree area */ static int dirtree_select_cb( GtkWidget *ctree_w, GdkEventButton *ev_button ) { GNode *dnode; int row; /* If About presentation is up, end it */ about( ABOUT_END ); if (globals.fsv_mode == FSV_SPLASH) return FALSE; gtk_clist_get_selection_info( GTK_CLIST(ctree_w), ev_button->x, ev_button->y, &row, NULL ); if (row < 0) return FALSE; dnode = (GNode *)gtk_clist_get_row_data( GTK_CLIST(ctree_w), row ); if (dnode == NULL) return FALSE; /* A single-click from button 1 highlights the node, shows the * name, and updates the file list if necessary. (and also selects * the row, but GTK+ does that automatically for us) */ if ((ev_button->button == 1) && (ev_button->type == GDK_BUTTON_PRESS)) { geometry_highlight_node( dnode, FALSE ); window_statusbar( SB_RIGHT, node_absname( dnode ) ); if (dnode != dirtree_current_dnode) filelist_populate( dnode ); dirtree_current_dnode = dnode; return FALSE; } /* A double-click from button 1 gets the camera moving */ if ((ev_button->button == 1) && (ev_button->type == GDK_2BUTTON_PRESS)) { camera_look_at( dnode ); /* Preempt the forthcoming tree expand/collapse * (the standard action spawned by a double-click) */ gtk_signal_emit_stop_by_name( GTK_OBJECT(ctree_w), "button_press_event" ); return TRUE; } /* A click from button 3 selects the row, highlights the node, * shows the name, updates the file list if necessary, and brings * up a context-sensitive menu */ if (ev_button->button == 3) { gtk_clist_select_row( GTK_CLIST(ctree_w), row, 0 ); geometry_highlight_node( dnode, FALSE ); window_statusbar( SB_RIGHT, node_absname( dnode ) ); if (dnode != dirtree_current_dnode) filelist_populate( dnode ); dirtree_current_dnode = dnode; context_menu( dnode, ev_button ); return FALSE; } return FALSE; }
static void ghack_ext_key_hit(GtkWidget *menuWin, GdkEventKey *event, gpointer data) { GtkWidget* clist; extMenu* info = (extMenu*) data; int i; char c = event->string[0]; clist = GTK_WIDGET(gtk_object_get_data(GTK_OBJECT(menuWin), "clist")); g_assert(clist != NULL); /* if too long between keystrokes, reset to initial state */ if (event->time - info->lastTime > 500) goto init_state; /* see if current item continue to match */ if (info->charIdx > 0) { if (extcmdlist[info->curItem].ef_txt[info->charIdx] == c) { ++info->charIdx; goto found; } } /* see if the prefix matches a later command in the list */ if (info->curItem >= 0) { for (i = info->curItem + 1; i < info->numRows; ++i) { if (!strncmp(extcmdlist[info->curItem].ef_txt, extcmdlist[i].ef_txt, info->charIdx)) { if (extcmdlist[i].ef_txt[info->charIdx] == c) { ++info->charIdx; info->curItem = i; goto found; } } } } init_state: /* reset to initial state, look for matching 1st character */ for (i = 0; i < info->numRows; ++i) { if (extcmdlist[i].ef_txt[0] == c) { info->charIdx = 1; info->curItem = i; goto found; } } /* no match: leave prior, if any selection in place */ return; found: info->lastTime = event->time; gtk_clist_select_row(GTK_CLIST(clist), info->curItem, 0); if (gtk_clist_row_is_visible(GTK_CLIST(clist), info->curItem) != GTK_VISIBILITY_FULL) gtk_clist_moveto(GTK_CLIST(clist), info->curItem, 0, 0.5, 0); }
static void opt_sel_key_hit(GtkWidget *widget, GdkEventKey *event, gpointer data) { int i; for (i = 0; i < no_tilesets; ++i) { if (toupper(tilesets[i].name[0]) == toupper(event->keyval)) { gn_tileset = i; gtk_clist_select_row( GTK_CLIST (clist), i, 0); } } }
static gboolean search_for_entry(GtkWidget *widget, GdkEventKey *event, dialog_generic_t *dptr) { GtkCList *clist = GTK_CLIST(widget); int z, wrapped; if(event->keyval == GDK_Return) { selection_made_common(widget, clist->focus_row, dptr); } if(!isprint(event->string[0])) { strcpy(search_target, ""); search_row = clist->focus_row; return 0; } if(event->time - search_time > SEARCH_RESET_TIME) { strcpy(search_target, ""); search_row = clist->focus_row; } search_time = event->time; if(strcmp(event->string, " ") == 0) { char *text; search_row = search_row + 1; if(!gtk_clist_get_text(clist, search_row, 0, &text)) search_row = 0; printf("next search: %d\n", search_row); } else { strcat(search_target, event->string); } for(z = search_row, wrapped=0; z != search_row || !wrapped; z ++) { char *text; printf("search: %d (wrapped=%d)\n", z, wrapped); if(!gtk_clist_get_text(clist, z, 0, &text)) { if(wrapped) break; // wrapped second time (why?) z = 0; wrapped = 1; } if(strstr(text, search_target)) { double pos = (z+.5) / (clist->rows-1); if(pos > 1) pos = 1; GTK_CLIST_GET_CLASS(clist)->scroll_vertical(clist, GTK_SCROLL_JUMP, pos); gtk_clist_select_row(clist, z, 0); search_row = z; return 1; } } return 0; }
void MedSLTDocWindow::IterateList(gboolean forward) { ACE_TRACE("[MedSLTDocWindow::IterateList()]"); if (GetUiState() != UI_STATE_CONNECTED) { return; } if (forward == true) { if (m_list_index < m_list_items - 1) { ++m_list_index; } else { m_list_index = 0; } gtk_clist_select_row((GtkCList*)m_list, m_list_index, 0); } else { if (m_list_index > 0) { --m_list_index; } else { m_list_index = m_list_items - 1; } gtk_clist_select_row((GtkCList*)m_list, m_list_index, 0); } ACE_DEBUG((LM_DEBUG, ACE_TEXT("%I[DEBUG] [MedSLTDocWindow::IterateList()] [i:%d]\n"), m_list_index)); return; }
static void editlist_gui_addnew (GtkWidget * igad) { int i; gchar *nnew[2]; nnew[0] = _("*NEW*"); nnew[1] = _("EDIT ME"); i = gtk_clist_append (GTK_CLIST (editlist_gui_list), nnew); gtk_clist_select_row (GTK_CLIST (editlist_gui_list), i, 0); gtk_clist_moveto (GTK_CLIST (editlist_gui_list), i, 0, 0.5, 0); }
void CheckDir( GtkWidget * list,char * directory ) { struct stat fs; int i; glob_t gg; if ( !fsFilter[0] ) return; gtk_widget_hide( list ); gtk_clist_clear( GTK_CLIST( list ) ); clist_append_fname(list, ".", dpixmap, dmask); clist_append_fname(list, "..", dpixmap, dmask); glob( "*",0,NULL,&gg ); for( i=0;(unsigned)i<gg.gl_pathc;i++ ) { stat( gg.gl_pathv[i],&fs ); if( !S_ISDIR( fs.st_mode ) ) continue; clist_append_fname(list, gg.gl_pathv[i], dpixmap, dmask); } globfree( &gg ); if ( strchr( fsFilter,',' ) ) { char tmp[8]; int i,c,glob_param = 0; for ( i=0,c=0;i<(int)strlen( fsFilter ) + 1;i++,c++ ) { tmp[c]=fsFilter[i]; if ( ( tmp[c] == ',' )||( tmp[c] == '\0' ) ) { tmp[c]=0; c=-1; glob( Filter( tmp ),glob_param,NULL,&gg ); glob_param=GLOB_APPEND; } } } else glob( Filter( fsFilter ),0,NULL,&gg ); for( i=0;(unsigned)i<gg.gl_pathc;i++ ) { stat( gg.gl_pathv[i],&fs ); if( S_ISDIR( fs.st_mode ) ) continue; clist_append_fname(list, gg.gl_pathv[i], fpixmap, fmask); } globfree( &gg ); gtk_clist_set_column_width( GTK_CLIST( list ),0,17 ); gtk_clist_select_row( GTK_CLIST( list ),0,1 ); gtk_widget_show( list ); }
void MedSLTPatWindow::IterateList(gboolean forward) { ACE_TRACE("[MedSLTPatWindow::IterateList()]"); if (GetUiState() != UI_STATE_CONNECTED) { return; } if (forward == true) { if (m_list_index < m_list_items - 1) { ++m_list_index; } else { m_list_index = 0; } gtk_clist_select_row((GtkCList*)m_list, m_list_index, 0); } else { if (m_list_index > 0) { --m_list_index; } else { m_list_index = m_list_items - 1; } gtk_clist_select_row((GtkCList*)m_list, m_list_index, 0); } return; }
gboolean button_press(GtkWidget *drawing_area, GdkEventButton *event, gpointer action) { if (event->button == 1) /* left button */ { ox = (int)event->x; oy = (int)event->y; erase_rubberbox(drawing_area); } else if (event->button == 3) /* right button */ { if (GPOINTER_TO_UINT(action) == ACTION_LCD_COORDS) { skin_infos.lcd_pos.top = tmp_rect.y; skin_infos.lcd_pos.left = tmp_rect.x; skin_infos.lcd_pos.bottom = tmp_rect.y + tmp_rect.h; skin_infos.lcd_pos.right = tmp_rect.x + tmp_rect.w; gtk_signal_disconnect(GTK_OBJECT(drawing_area), lcd_mouse_motion); gtk_signal_disconnect(GTK_OBJECT(drawing_area), lcd_button_press); lcd_mouse_motion = 0; lcd_button_press = 0; erase_rubberbox(drawing_area); sbar_print(_("Saved LCD coordinates")); } else { skin_infos.keys_pos[clist_row].top = tmp_rect.y; skin_infos.keys_pos[clist_row].left = tmp_rect.x; skin_infos.keys_pos[clist_row].bottom = tmp_rect.y + tmp_rect.h; skin_infos.keys_pos[clist_row].right = tmp_rect.x + tmp_rect.w; gtk_clist_moveto(GTK_CLIST(lookup_widget(GTK_WIDGET(list_keys_dialog), "list_keys")), (((clist_row + 1) < clist_max) ? (clist_row + 1) : 0), 0, 0.5, 0); gtk_clist_select_row(GTK_CLIST(lookup_widget(GTK_WIDGET(list_keys_dialog), "list_keys")), (((clist_row + 1) < clist_max) ? (clist_row + 1) : 0), 0); } } return FALSE; }
void add_minilist_item(GtkWidget * button, gpointer data) { int added_row; gchar *to_add[1]; struct slist_gui *the_gui = (struct slist_gui *) data; struct fnlist *current, *new_one; if (!the_gui) { NE_DEBUG(DEBUG_GNOME, "WARNING: gui component was null.\n"); return; } to_add[0] = strdup("New filename or expression"); added_row = gtk_clist_append(GTK_CLIST(the_gui->list), to_add); current = the_gui->data; if (current != NULL) while (current->next != NULL) current = current->next; new_one = malloc(sizeof(struct fnlist)); new_one->pattern = to_add[0]; new_one->next = NULL; if (!current) { new_one->prev = NULL; the_gui->data = new_one; switch (the_gui->type) { case list_exclude: selected_site->excludes = the_gui->data; the_gui->data = selected_site->excludes; break; case list_ascii: selected_site->asciis = the_gui->data; the_gui->data = selected_site->asciis; break; case list_ignore: selected_site->ignores = the_gui->data; the_gui->data = selected_site->ignores; break; } } else { new_one->prev = current; current->next = new_one; } gtk_clist_set_row_data(GTK_CLIST(the_gui->list), added_row, (gpointer) new_one); gtk_clist_select_row(GTK_CLIST(the_gui->list), added_row, 0); }
static int mod_update(void) { char *module= NULL; /* Update the mod stuff */ if (GTK_CLIST(modules)->selection) { module= (char *)gtk_clist_get_row_data(GTK_CLIST(modules), (int) GTK_CLIST(modules)->selection->data); } gtk_clist_freeze(GTK_CLIST(modules)); gtk_clist_clear(GTK_CLIST(modules)); ast_update_module_list(add_mod, NULL); if (module) gtk_clist_select_row(GTK_CLIST(modules), gtk_clist_find_row_from_data(GTK_CLIST(modules), module), -1); gtk_clist_thaw(GTK_CLIST(modules)); return 1; }
static void player_sel_key_hit (GtkWidget *widget, GdkEventKey *event, gpointer data) { const char** roles = data; int i; for (i = 0; roles[i] != 0; ++i) { if (tolower(roles[i][0]) == tolower(event->keyval)) { role_number = i; gtk_clist_select_row( GTK_CLIST (clist), i, 0); if (gtk_clist_row_is_visible(GTK_CLIST(clist), i) != GTK_VISIBILITY_FULL) gtk_clist_moveto(GTK_CLIST(clist), i, 0, 0.5, 0); } } }
static int pattern_clist_event_callback (GtkWidget *widget, GdkEvent *event) { GdkEventButton *bevent = (GdkEventButton *) event; int row, column; int add; if ((event->type == GDK_BUTTON_PRESS || event->type == GDK_2BUTTON_PRESS || event->type == GDK_3BUTTON_PRESS) && bevent->window == GTK_CLIST (pattern_clist)->clist_window) { if (gtk_clist_get_selection_info (GTK_CLIST (pattern_clist), bevent->x, bevent->y, &row, &column)) { if (event->type == GDK_BUTTON_PRESS) { if (column >= 0) { switch (column) { case 0: case 1: case 2: sync_pattern_data (); add = (bevent->button == 3) || (bevent->state & (GDK_CONTROL_MASK | GDK_SHIFT_MASK)) != 0; pattern_set_groups (row, column, add); return TRUE; case 3: /* sync_pattern_data () is called by "select_row" callback */ gtk_clist_select_row (GTK_CLIST (pattern_clist), row, 0); show_pattern_error (row); return TRUE; default: break; } } } if (event->type == GDK_2BUTTON_PRESS || event->type == GDK_3BUTTON_PRESS) return TRUE; } } return FALSE; }
bool gtkgui_add_into_pl(unsigned int chan, char *file) { struct gchan *c; char *cist[1]; c=(struct gchan *)list_get_data(listachan, chan+1, 0); /* o=gcb_findch(chan+1, NOPOS); */ if(!c) return false; cist[0] = file; int riga = gtk_clist_append(GTK_CLIST(c->lista), cist); if(!riga) gtk_clist_select_row(GTK_CLIST(c->lista), 0, 0); return true; }
/* This sets the current key, using the given key name. */ void glade_keys_dialog_set_key_symbol (GladeKeysDialog *dialog, const gchar *key) { gint row, index; for (row = 0; row < GTK_CLIST (dialog->clist)->rows; row++) { index = GPOINTER_TO_INT (gtk_clist_get_row_data (GTK_CLIST (dialog->clist), row)); if (!strcmp (GbKeys[index].name, key)) { gtk_clist_select_row (GTK_CLIST (dialog->clist), row, 0); break; } } }
/* This sets the current key, using the given key value. */ void glade_keys_dialog_set_key (GladeKeysDialog *dialog, guint key) { gint row, index; for (row = 0; row < GTK_CLIST (dialog->clist)->rows; row++) { index = GPOINTER_TO_INT (gtk_clist_get_row_data (GTK_CLIST (dialog->clist), row)); if (GbKeys[index].key == key) { gtk_clist_select_row (GTK_CLIST (dialog->clist), row, 0); break; } } }
/* Callback for a click in the file list area */ static int filelist_select_cb( GtkWidget *clist_w, GdkEventButton *ev_button ) { GNode *node; int row; /* If About presentation is up, end it */ about( ABOUT_END ); if (globals.fsv_mode == FSV_SPLASH) return FALSE; gtk_clist_get_selection_info( GTK_CLIST(clist_w), ev_button->x, ev_button->y, &row, NULL ); if (row < 0) return FALSE; node = (GNode *)gtk_clist_get_row_data( GTK_CLIST(clist_w), row ); if (node == NULL) return FALSE; /* A single-click from button 1 highlights the node and shows the * name (and also selects the row, but GTK+ does that for us) */ if ((ev_button->button == 1) && (ev_button->type == GDK_BUTTON_PRESS)) { geometry_highlight_node( node, FALSE ); window_statusbar( SB_RIGHT, node_absname( node ) ); return FALSE; } /* A double-click from button 1 gets the camera moving */ if ((ev_button->button == 1) && (ev_button->type == GDK_2BUTTON_PRESS)) { camera_look_at( node ); return FALSE; } /* A click from button 3 selects the row, highlights the node, * shows the name, and pops up a context-sensitive menu */ if (ev_button->button == 3) { gtk_clist_select_row( GTK_CLIST(clist_w), row, 0 ); geometry_highlight_node( node, FALSE ); window_statusbar( SB_RIGHT, node_absname( node ) ); context_menu( node, ev_button ); return FALSE; } return FALSE; }
void del_ipvs_server(advertised_service *a, ipvs_server *ipvs){ GList *l; gint i; extern GtkWidget *ipvs_server_clist; _del_ipvs_server(ipvs); for(i=0,l=a->ipvs_servers;l;l=l->next,i++){ if(l->data==ipvs){ gtk_clist_select_row(GTK_CLIST(ipvs_server_clist), i + 1, 0); gtk_clist_remove(GTK_CLIST(ipvs_server_clist), i); break; } } a->ipvs_servers = g_list_remove(a->ipvs_servers, ipvs); }
static void cb_clist_down(GtkWidget *widget) { gint row; row = selected_row; if (row >= 0 && row < GTK_CLIST(reader_clist)->rows - 1) { gtk_clist_row_move(GTK_CLIST(reader_clist), row, row + 1); gtk_clist_select_row(GTK_CLIST(reader_clist), row + 1, -1); if (gtk_clist_row_is_visible(GTK_CLIST(reader_clist), row + 1) != GTK_VISIBILITY_FULL) gtk_clist_moveto(GTK_CLIST(reader_clist), row + 1, -1, 1.0, 0.0); selected_row = row + 1; list_modified = TRUE; } }
void del_back_end_server(advertised_service *a, back_end_server *be){ GList *l; gint i; extern GtkWidget *back_end_server_clist; _del_back_end_server(be); for(i=0,l=a->back_end_servers;l;l=l->next,i++){ if(l->data==be){ gtk_clist_select_row(GTK_CLIST(back_end_server_clist), i + 1, 0); gtk_clist_remove(GTK_CLIST(back_end_server_clist), i); break; } } a->back_end_servers = g_list_remove(a->back_end_servers, be); }