gconf.c (5b45fe6b39e1d01c45de7b8e6d3ff72585eee6cf) | gconf.c (694c49a7c01cc87194be40cb26404b58b68c291c) |
---|---|
1/* Hey EMACS -*- linux-c -*- */ 2/* 3 * 4 * Copyright (C) 2002-2003 Romain Lievin <roms@tilp.info> 5 * Released under the terms of the GNU GPL v2.0. 6 * 7 */ 8 --- 123 unchanged lines hidden (view full) --- 132{ 133 GladeXML *xml; 134 GtkWidget *widget; 135 GtkTextBuffer *txtbuf; 136 GtkStyle *style; 137 138 xml = glade_xml_new(glade_file, "window1", NULL); 139 if (!xml) | 1/* Hey EMACS -*- linux-c -*- */ 2/* 3 * 4 * Copyright (C) 2002-2003 Romain Lievin <roms@tilp.info> 5 * Released under the terms of the GNU GPL v2.0. 6 * 7 */ 8 --- 123 unchanged lines hidden (view full) --- 132{ 133 GladeXML *xml; 134 GtkWidget *widget; 135 GtkTextBuffer *txtbuf; 136 GtkStyle *style; 137 138 xml = glade_xml_new(glade_file, "window1", NULL); 139 if (!xml) |
140 g_error(_("GUI loading failed !\n")); | 140 g_error("GUI loading failed !\n"); |
141 glade_xml_signal_autoconnect(xml); 142 143 main_wnd = glade_xml_get_widget(xml, "window1"); 144 hpaned = glade_xml_get_widget(xml, "hpaned1"); 145 vpaned = glade_xml_get_widget(xml, "vpaned1"); 146 tree1_w = glade_xml_get_widget(xml, "treeview1"); 147 tree2_w = glade_xml_get_widget(xml, "treeview2"); 148 text_w = glade_xml_get_widget(xml, "textview3"); --- 79 unchanged lines hidden (view full) --- 228 GtkTreeViewColumn *column; 229 230 gtk_tree_view_set_model(view, model1); 231 gtk_tree_view_set_headers_visible(view, TRUE); 232 gtk_tree_view_set_rules_hint(view, TRUE); 233 234 column = gtk_tree_view_column_new(); 235 gtk_tree_view_append_column(view, column); | 141 glade_xml_signal_autoconnect(xml); 142 143 main_wnd = glade_xml_get_widget(xml, "window1"); 144 hpaned = glade_xml_get_widget(xml, "hpaned1"); 145 vpaned = glade_xml_get_widget(xml, "vpaned1"); 146 tree1_w = glade_xml_get_widget(xml, "treeview1"); 147 tree2_w = glade_xml_get_widget(xml, "treeview2"); 148 text_w = glade_xml_get_widget(xml, "textview3"); --- 79 unchanged lines hidden (view full) --- 228 GtkTreeViewColumn *column; 229 230 gtk_tree_view_set_model(view, model1); 231 gtk_tree_view_set_headers_visible(view, TRUE); 232 gtk_tree_view_set_rules_hint(view, TRUE); 233 234 column = gtk_tree_view_column_new(); 235 gtk_tree_view_append_column(view, column); |
236 gtk_tree_view_column_set_title(column, _("Options")); | 236 gtk_tree_view_column_set_title(column, "Options"); |
237 238 renderer = gtk_cell_renderer_toggle_new(); 239 gtk_tree_view_column_pack_start(GTK_TREE_VIEW_COLUMN(column), 240 renderer, FALSE); 241 gtk_tree_view_column_set_attributes(GTK_TREE_VIEW_COLUMN(column), 242 renderer, 243 "active", COL_BTNACT, 244 "inconsistent", COL_BTNINC, --- 26 unchanged lines hidden (view full) --- 271 gint i; 272 273 gtk_tree_view_set_model(view, model2); 274 gtk_tree_view_set_headers_visible(view, TRUE); 275 gtk_tree_view_set_rules_hint(view, TRUE); 276 277 column = gtk_tree_view_column_new(); 278 gtk_tree_view_append_column(view, column); | 237 238 renderer = gtk_cell_renderer_toggle_new(); 239 gtk_tree_view_column_pack_start(GTK_TREE_VIEW_COLUMN(column), 240 renderer, FALSE); 241 gtk_tree_view_column_set_attributes(GTK_TREE_VIEW_COLUMN(column), 242 renderer, 243 "active", COL_BTNACT, 244 "inconsistent", COL_BTNINC, --- 26 unchanged lines hidden (view full) --- 271 gint i; 272 273 gtk_tree_view_set_model(view, model2); 274 gtk_tree_view_set_headers_visible(view, TRUE); 275 gtk_tree_view_set_rules_hint(view, TRUE); 276 277 column = gtk_tree_view_column_new(); 278 gtk_tree_view_append_column(view, column); |
279 gtk_tree_view_column_set_title(column, _("Options")); | 279 gtk_tree_view_column_set_title(column, "Options"); |
280 281 renderer = gtk_cell_renderer_pixbuf_new(); 282 gtk_tree_view_column_pack_start(GTK_TREE_VIEW_COLUMN(column), 283 renderer, FALSE); 284 gtk_tree_view_column_set_attributes(GTK_TREE_VIEW_COLUMN(column), 285 renderer, 286 "pixbuf", COL_PIXBUF, 287 "visible", COL_PIXVIS, NULL); --- 12 unchanged lines hidden (view full) --- 300 gtk_tree_view_column_set_attributes(GTK_TREE_VIEW_COLUMN(column), 301 renderer, 302 "text", COL_OPTION, 303 "foreground-gdk", 304 COL_COLOR, NULL); 305 306 renderer = gtk_cell_renderer_text_new(); 307 gtk_tree_view_insert_column_with_attributes(view, -1, | 280 281 renderer = gtk_cell_renderer_pixbuf_new(); 282 gtk_tree_view_column_pack_start(GTK_TREE_VIEW_COLUMN(column), 283 renderer, FALSE); 284 gtk_tree_view_column_set_attributes(GTK_TREE_VIEW_COLUMN(column), 285 renderer, 286 "pixbuf", COL_PIXBUF, 287 "visible", COL_PIXVIS, NULL); --- 12 unchanged lines hidden (view full) --- 300 gtk_tree_view_column_set_attributes(GTK_TREE_VIEW_COLUMN(column), 301 renderer, 302 "text", COL_OPTION, 303 "foreground-gdk", 304 COL_COLOR, NULL); 305 306 renderer = gtk_cell_renderer_text_new(); 307 gtk_tree_view_insert_column_with_attributes(view, -1, |
308 _("Name"), renderer, | 308 "Name", renderer, |
309 "text", COL_NAME, 310 "foreground-gdk", 311 COL_COLOR, NULL); 312 renderer = gtk_cell_renderer_text_new(); 313 gtk_tree_view_insert_column_with_attributes(view, -1, 314 "N", renderer, 315 "text", COL_NO, 316 "foreground-gdk", --- 7 unchanged lines hidden (view full) --- 324 renderer = gtk_cell_renderer_text_new(); 325 gtk_tree_view_insert_column_with_attributes(view, -1, 326 "Y", renderer, 327 "text", COL_YES, 328 "foreground-gdk", 329 COL_COLOR, NULL); 330 renderer = gtk_cell_renderer_text_new(); 331 gtk_tree_view_insert_column_with_attributes(view, -1, | 309 "text", COL_NAME, 310 "foreground-gdk", 311 COL_COLOR, NULL); 312 renderer = gtk_cell_renderer_text_new(); 313 gtk_tree_view_insert_column_with_attributes(view, -1, 314 "N", renderer, 315 "text", COL_NO, 316 "foreground-gdk", --- 7 unchanged lines hidden (view full) --- 324 renderer = gtk_cell_renderer_text_new(); 325 gtk_tree_view_insert_column_with_attributes(view, -1, 326 "Y", renderer, 327 "text", COL_YES, 328 "foreground-gdk", 329 COL_COLOR, NULL); 330 renderer = gtk_cell_renderer_text_new(); 331 gtk_tree_view_insert_column_with_attributes(view, -1, |
332 _("Value"), renderer, | 332 "Value", renderer, |
333 "text", COL_VALUE, 334 "editable", 335 COL_EDIT, 336 "foreground-gdk", 337 COL_COLOR, NULL); 338 g_signal_connect(G_OBJECT(renderer), "edited", 339 G_CALLBACK(renderer_edited), NULL); 340 --- 22 unchanged lines hidden (view full) --- 363 364/* Utility Functions */ 365 366 367static void text_insert_help(struct menu *menu) 368{ 369 GtkTextBuffer *buffer; 370 GtkTextIter start, end; | 333 "text", COL_VALUE, 334 "editable", 335 COL_EDIT, 336 "foreground-gdk", 337 COL_COLOR, NULL); 338 g_signal_connect(G_OBJECT(renderer), "edited", 339 G_CALLBACK(renderer_edited), NULL); 340 --- 22 unchanged lines hidden (view full) --- 363 364/* Utility Functions */ 365 366 367static void text_insert_help(struct menu *menu) 368{ 369 GtkTextBuffer *buffer; 370 GtkTextIter start, end; |
371 const char *prompt = _(menu_get_prompt(menu)); | 371 const char *prompt = menu_get_prompt(menu); |
372 struct gstr help = str_new(); 373 374 menu_get_ext_help(menu, &help); 375 376 buffer = gtk_text_view_get_buffer(GTK_TEXT_VIEW(text_w)); 377 gtk_text_buffer_get_bounds(buffer, &start, &end); 378 gtk_text_buffer_delete(buffer, &start, &end); 379 gtk_text_view_set_left_margin(GTK_TEXT_VIEW(text_w), 15); --- 37 unchanged lines hidden (view full) --- 417 gpointer user_data) 418{ 419 GtkWidget *dialog, *label; 420 gint result; 421 422 if (!conf_get_changed()) 423 return FALSE; 424 | 372 struct gstr help = str_new(); 373 374 menu_get_ext_help(menu, &help); 375 376 buffer = gtk_text_view_get_buffer(GTK_TEXT_VIEW(text_w)); 377 gtk_text_buffer_get_bounds(buffer, &start, &end); 378 gtk_text_buffer_delete(buffer, &start, &end); 379 gtk_text_view_set_left_margin(GTK_TEXT_VIEW(text_w), 15); --- 37 unchanged lines hidden (view full) --- 417 gpointer user_data) 418{ 419 GtkWidget *dialog, *label; 420 gint result; 421 422 if (!conf_get_changed()) 423 return FALSE; 424 |
425 dialog = gtk_dialog_new_with_buttons(_("Warning !"), | 425 dialog = gtk_dialog_new_with_buttons("Warning !", |
426 GTK_WINDOW(main_wnd), 427 (GtkDialogFlags) 428 (GTK_DIALOG_MODAL | 429 GTK_DIALOG_DESTROY_WITH_PARENT), 430 GTK_STOCK_OK, 431 GTK_RESPONSE_YES, 432 GTK_STOCK_NO, 433 GTK_RESPONSE_NO, 434 GTK_STOCK_CANCEL, 435 GTK_RESPONSE_CANCEL, NULL); 436 gtk_dialog_set_default_response(GTK_DIALOG(dialog), 437 GTK_RESPONSE_CANCEL); 438 | 426 GTK_WINDOW(main_wnd), 427 (GtkDialogFlags) 428 (GTK_DIALOG_MODAL | 429 GTK_DIALOG_DESTROY_WITH_PARENT), 430 GTK_STOCK_OK, 431 GTK_RESPONSE_YES, 432 GTK_STOCK_NO, 433 GTK_RESPONSE_NO, 434 GTK_STOCK_CANCEL, 435 GTK_RESPONSE_CANCEL, NULL); 436 gtk_dialog_set_default_response(GTK_DIALOG(dialog), 437 GTK_RESPONSE_CANCEL); 438 |
439 label = gtk_label_new(_("\nSave configuration ?\n")); | 439 label = gtk_label_new("\nSave configuration ?\n"); |
440 gtk_container_add(GTK_CONTAINER(GTK_DIALOG(dialog)->vbox), label); 441 gtk_widget_show(label); 442 443 result = gtk_dialog_run(GTK_DIALOG(dialog)); 444 switch (result) { 445 case GTK_RESPONSE_YES: 446 on_save_activate(NULL, NULL); 447 return FALSE; --- 43 unchanged lines hidden (view full) --- 491load_filename(GtkFileSelection * file_selector, gpointer user_data) 492{ 493 const gchar *fn; 494 495 fn = gtk_file_selection_get_filename(GTK_FILE_SELECTION 496 (user_data)); 497 498 if (conf_read(fn)) | 440 gtk_container_add(GTK_CONTAINER(GTK_DIALOG(dialog)->vbox), label); 441 gtk_widget_show(label); 442 443 result = gtk_dialog_run(GTK_DIALOG(dialog)); 444 switch (result) { 445 case GTK_RESPONSE_YES: 446 on_save_activate(NULL, NULL); 447 return FALSE; --- 43 unchanged lines hidden (view full) --- 491load_filename(GtkFileSelection * file_selector, gpointer user_data) 492{ 493 const gchar *fn; 494 495 fn = gtk_file_selection_get_filename(GTK_FILE_SELECTION 496 (user_data)); 497 498 if (conf_read(fn)) |
499 text_insert_msg(_("Error"), _("Unable to load configuration !")); | 499 text_insert_msg("Error", "Unable to load configuration !"); |
500 else 501 display_tree(&rootmenu); 502} 503 504void on_load1_activate(GtkMenuItem * menuitem, gpointer user_data) 505{ 506 GtkWidget *fs; 507 | 500 else 501 display_tree(&rootmenu); 502} 503 504void on_load1_activate(GtkMenuItem * menuitem, gpointer user_data) 505{ 506 GtkWidget *fs; 507 |
508 fs = gtk_file_selection_new(_("Load file...")); | 508 fs = gtk_file_selection_new("Load file..."); |
509 g_signal_connect(GTK_OBJECT(GTK_FILE_SELECTION(fs)->ok_button), 510 "clicked", 511 G_CALLBACK(load_filename), (gpointer) fs); 512 g_signal_connect_swapped(GTK_OBJECT 513 (GTK_FILE_SELECTION(fs)->ok_button), 514 "clicked", G_CALLBACK(gtk_widget_destroy), 515 (gpointer) fs); 516 g_signal_connect_swapped(GTK_OBJECT 517 (GTK_FILE_SELECTION(fs)->cancel_button), 518 "clicked", G_CALLBACK(gtk_widget_destroy), 519 (gpointer) fs); 520 gtk_widget_show(fs); 521} 522 523 524void on_save_activate(GtkMenuItem * menuitem, gpointer user_data) 525{ 526 if (conf_write(NULL)) | 509 g_signal_connect(GTK_OBJECT(GTK_FILE_SELECTION(fs)->ok_button), 510 "clicked", 511 G_CALLBACK(load_filename), (gpointer) fs); 512 g_signal_connect_swapped(GTK_OBJECT 513 (GTK_FILE_SELECTION(fs)->ok_button), 514 "clicked", G_CALLBACK(gtk_widget_destroy), 515 (gpointer) fs); 516 g_signal_connect_swapped(GTK_OBJECT 517 (GTK_FILE_SELECTION(fs)->cancel_button), 518 "clicked", G_CALLBACK(gtk_widget_destroy), 519 (gpointer) fs); 520 gtk_widget_show(fs); 521} 522 523 524void on_save_activate(GtkMenuItem * menuitem, gpointer user_data) 525{ 526 if (conf_write(NULL)) |
527 text_insert_msg(_("Error"), _("Unable to save configuration !")); | 527 text_insert_msg("Error", "Unable to save configuration !"); |
528} 529 530 531static void 532store_filename(GtkFileSelection * file_selector, gpointer user_data) 533{ 534 const gchar *fn; 535 536 fn = gtk_file_selection_get_filename(GTK_FILE_SELECTION 537 (user_data)); 538 539 if (conf_write(fn)) | 528} 529 530 531static void 532store_filename(GtkFileSelection * file_selector, gpointer user_data) 533{ 534 const gchar *fn; 535 536 fn = gtk_file_selection_get_filename(GTK_FILE_SELECTION 537 (user_data)); 538 539 if (conf_write(fn)) |
540 text_insert_msg(_("Error"), _("Unable to save configuration !")); | 540 text_insert_msg("Error", "Unable to save configuration !"); |
541 542 gtk_widget_destroy(GTK_WIDGET(user_data)); 543} 544 545void on_save_as1_activate(GtkMenuItem * menuitem, gpointer user_data) 546{ 547 GtkWidget *fs; 548 | 541 542 gtk_widget_destroy(GTK_WIDGET(user_data)); 543} 544 545void on_save_as1_activate(GtkMenuItem * menuitem, gpointer user_data) 546{ 547 GtkWidget *fs; 548 |
549 fs = gtk_file_selection_new(_("Save file as...")); | 549 fs = gtk_file_selection_new("Save file as..."); |
550 g_signal_connect(GTK_OBJECT(GTK_FILE_SELECTION(fs)->ok_button), 551 "clicked", 552 G_CALLBACK(store_filename), (gpointer) fs); 553 g_signal_connect_swapped(GTK_OBJECT 554 (GTK_FILE_SELECTION(fs)->ok_button), 555 "clicked", G_CALLBACK(gtk_widget_destroy), 556 (gpointer) fs); 557 g_signal_connect_swapped(GTK_OBJECT --- 76 unchanged lines hidden (view full) --- 634 gtk_tree_store_clear(tree2); 635 display_tree(&rootmenu); /* instead of update_tree to speed-up */ 636} 637 638 639void on_introduction1_activate(GtkMenuItem * menuitem, gpointer user_data) 640{ 641 GtkWidget *dialog; | 550 g_signal_connect(GTK_OBJECT(GTK_FILE_SELECTION(fs)->ok_button), 551 "clicked", 552 G_CALLBACK(store_filename), (gpointer) fs); 553 g_signal_connect_swapped(GTK_OBJECT 554 (GTK_FILE_SELECTION(fs)->ok_button), 555 "clicked", G_CALLBACK(gtk_widget_destroy), 556 (gpointer) fs); 557 g_signal_connect_swapped(GTK_OBJECT --- 76 unchanged lines hidden (view full) --- 634 gtk_tree_store_clear(tree2); 635 display_tree(&rootmenu); /* instead of update_tree to speed-up */ 636} 637 638 639void on_introduction1_activate(GtkMenuItem * menuitem, gpointer user_data) 640{ 641 GtkWidget *dialog; |
642 const gchar *intro_text = _( | 642 const gchar *intro_text = |
643 "Welcome to gkc, the GTK+ graphical configuration tool\n" 644 "For each option, a blank box indicates the feature is disabled, a\n" 645 "check indicates it is enabled, and a dot indicates that it is to\n" 646 "be compiled as a module. Clicking on the box will cycle through the three states.\n" 647 "\n" 648 "If you do not see an option (e.g., a device driver) that you\n" 649 "believe should be present, try turning on Show All Options\n" 650 "under the Options menu.\n" 651 "Although there is no cross reference yet to help you figure out\n" 652 "what other options must be enabled to support the option you\n" 653 "are interested in, you can still view the help of a grayed-out\n" 654 "option.\n" 655 "\n" 656 "Toggling Show Debug Info under the Options menu will show \n" | 643 "Welcome to gkc, the GTK+ graphical configuration tool\n" 644 "For each option, a blank box indicates the feature is disabled, a\n" 645 "check indicates it is enabled, and a dot indicates that it is to\n" 646 "be compiled as a module. Clicking on the box will cycle through the three states.\n" 647 "\n" 648 "If you do not see an option (e.g., a device driver) that you\n" 649 "believe should be present, try turning on Show All Options\n" 650 "under the Options menu.\n" 651 "Although there is no cross reference yet to help you figure out\n" 652 "what other options must be enabled to support the option you\n" 653 "are interested in, you can still view the help of a grayed-out\n" 654 "option.\n" 655 "\n" 656 "Toggling Show Debug Info under the Options menu will show \n" |
657 "the dependencies, which you can then match by examining other options."); | 657 "the dependencies, which you can then match by examining other options."; |
658 659 dialog = gtk_message_dialog_new(GTK_WINDOW(main_wnd), 660 GTK_DIALOG_DESTROY_WITH_PARENT, 661 GTK_MESSAGE_INFO, 662 GTK_BUTTONS_CLOSE, "%s", intro_text); 663 g_signal_connect_swapped(GTK_OBJECT(dialog), "response", 664 G_CALLBACK(gtk_widget_destroy), 665 GTK_OBJECT(dialog)); 666 gtk_widget_show_all(dialog); 667} 668 669 670void on_about1_activate(GtkMenuItem * menuitem, gpointer user_data) 671{ 672 GtkWidget *dialog; 673 const gchar *about_text = | 658 659 dialog = gtk_message_dialog_new(GTK_WINDOW(main_wnd), 660 GTK_DIALOG_DESTROY_WITH_PARENT, 661 GTK_MESSAGE_INFO, 662 GTK_BUTTONS_CLOSE, "%s", intro_text); 663 g_signal_connect_swapped(GTK_OBJECT(dialog), "response", 664 G_CALLBACK(gtk_widget_destroy), 665 GTK_OBJECT(dialog)); 666 gtk_widget_show_all(dialog); 667} 668 669 670void on_about1_activate(GtkMenuItem * menuitem, gpointer user_data) 671{ 672 GtkWidget *dialog; 673 const gchar *about_text = |
674 _("gkc is copyright (c) 2002 Romain Lievin <roms@lpg.ticalc.org>.\n" 675 "Based on the source code from Roman Zippel.\n"); | 674 "gkc is copyright (c) 2002 Romain Lievin <roms@lpg.ticalc.org>.\n" 675 "Based on the source code from Roman Zippel.\n"; |
676 677 dialog = gtk_message_dialog_new(GTK_WINDOW(main_wnd), 678 GTK_DIALOG_DESTROY_WITH_PARENT, 679 GTK_MESSAGE_INFO, 680 GTK_BUTTONS_CLOSE, "%s", about_text); 681 g_signal_connect_swapped(GTK_OBJECT(dialog), "response", 682 G_CALLBACK(gtk_widget_destroy), 683 GTK_OBJECT(dialog)); 684 gtk_widget_show_all(dialog); 685} 686 687 688void on_license1_activate(GtkMenuItem * menuitem, gpointer user_data) 689{ 690 GtkWidget *dialog; 691 const gchar *license_text = | 676 677 dialog = gtk_message_dialog_new(GTK_WINDOW(main_wnd), 678 GTK_DIALOG_DESTROY_WITH_PARENT, 679 GTK_MESSAGE_INFO, 680 GTK_BUTTONS_CLOSE, "%s", about_text); 681 g_signal_connect_swapped(GTK_OBJECT(dialog), "response", 682 G_CALLBACK(gtk_widget_destroy), 683 GTK_OBJECT(dialog)); 684 gtk_widget_show_all(dialog); 685} 686 687 688void on_license1_activate(GtkMenuItem * menuitem, gpointer user_data) 689{ 690 GtkWidget *dialog; 691 const gchar *license_text = |
692 _("gkc is released under the terms of the GNU GPL v2.\n" | 692 "gkc is released under the terms of the GNU GPL v2.\n" |
693 "For more information, please see the source code or\n" | 693 "For more information, please see the source code or\n" |
694 "visit http://www.fsf.org/licenses/licenses.html\n"); | 694 "visit http://www.fsf.org/licenses/licenses.html\n"; |
695 696 dialog = gtk_message_dialog_new(GTK_WINDOW(main_wnd), 697 GTK_DIALOG_DESTROY_WITH_PARENT, 698 GTK_MESSAGE_INFO, 699 GTK_BUTTONS_CLOSE, "%s", license_text); 700 g_signal_connect_swapped(GTK_OBJECT(dialog), "response", 701 G_CALLBACK(gtk_widget_destroy), 702 GTK_OBJECT(dialog)); --- 341 unchanged lines hidden (view full) --- 1044 enum prop_type ptype; 1045 int i; 1046 1047 for (i = COL_OPTION; i <= COL_COLOR; i++) 1048 g_free(row[i]); 1049 bzero(row, sizeof(row)); 1050 1051 row[COL_OPTION] = | 695 696 dialog = gtk_message_dialog_new(GTK_WINDOW(main_wnd), 697 GTK_DIALOG_DESTROY_WITH_PARENT, 698 GTK_MESSAGE_INFO, 699 GTK_BUTTONS_CLOSE, "%s", license_text); 700 g_signal_connect_swapped(GTK_OBJECT(dialog), "response", 701 G_CALLBACK(gtk_widget_destroy), 702 GTK_OBJECT(dialog)); --- 341 unchanged lines hidden (view full) --- 1044 enum prop_type ptype; 1045 int i; 1046 1047 for (i = COL_OPTION; i <= COL_COLOR; i++) 1048 g_free(row[i]); 1049 bzero(row, sizeof(row)); 1050 1051 row[COL_OPTION] = |
1052 g_strdup_printf("%s %s", _(menu_get_prompt(menu)), | 1052 g_strdup_printf("%s %s", menu_get_prompt(menu), |
1053 sym && !sym_has_value(sym) ? "(NEW)" : ""); 1054 1055 if (opt_mode == OPT_ALL && !menu_is_visible(menu)) 1056 row[COL_COLOR] = g_strdup("DarkGray"); 1057 else if (opt_mode == OPT_PROMPT && 1058 menu_has_prompt(menu) && !menu_is_visible(menu)) 1059 row[COL_COLOR] = g_strdup("DarkGray"); 1060 else --- 36 unchanged lines hidden (view full) --- 1097 for (child = menu->list; child; child = child->next) { 1098 if (menu_is_visible(child) 1099 && child->sym == def_sym) 1100 def_menu = child; 1101 } 1102 1103 if (def_menu) 1104 row[COL_VALUE] = | 1053 sym && !sym_has_value(sym) ? "(NEW)" : ""); 1054 1055 if (opt_mode == OPT_ALL && !menu_is_visible(menu)) 1056 row[COL_COLOR] = g_strdup("DarkGray"); 1057 else if (opt_mode == OPT_PROMPT && 1058 menu_has_prompt(menu) && !menu_is_visible(menu)) 1059 row[COL_COLOR] = g_strdup("DarkGray"); 1060 else --- 36 unchanged lines hidden (view full) --- 1097 for (child = menu->list; child; child = child->next) { 1098 if (menu_is_visible(child) 1099 && child->sym == def_sym) 1100 def_menu = child; 1101 } 1102 1103 if (def_menu) 1104 row[COL_VALUE] = |
1105 g_strdup(_(menu_get_prompt(def_menu))); | 1105 g_strdup(menu_get_prompt(def_menu)); |
1106 } 1107 if (sym->flags & SYMBOL_CHOICEVAL) 1108 row[COL_BTNRAD] = GINT_TO_POINTER(TRUE); 1109 1110 stype = sym_get_type(sym); 1111 switch (stype) { 1112 case S_BOOLEAN: 1113 if (GPOINTER_TO_INT(row[COL_PIXVIS]) == FALSE) --- 328 unchanged lines hidden (view full) --- 1442 1443/* Main */ 1444int main(int ac, char *av[]) 1445{ 1446 const char *name; 1447 char *env; 1448 gchar *glade_file; 1449 | 1106 } 1107 if (sym->flags & SYMBOL_CHOICEVAL) 1108 row[COL_BTNRAD] = GINT_TO_POINTER(TRUE); 1109 1110 stype = sym_get_type(sym); 1111 switch (stype) { 1112 case S_BOOLEAN: 1113 if (GPOINTER_TO_INT(row[COL_PIXVIS]) == FALSE) --- 328 unchanged lines hidden (view full) --- 1442 1443/* Main */ 1444int main(int ac, char *av[]) 1445{ 1446 const char *name; 1447 char *env; 1448 gchar *glade_file; 1449 |
1450 bindtextdomain(PACKAGE, LOCALEDIR); 1451 bind_textdomain_codeset(PACKAGE, "UTF-8"); 1452 textdomain(PACKAGE); 1453 | |
1454 /* GTK stuffs */ 1455 gtk_set_locale(); 1456 gtk_init(&ac, &av); 1457 glade_init(); 1458 1459 //add_pixmap_directory (PACKAGE_DATA_DIR "/" PACKAGE "/pixmaps"); 1460 //add_pixmap_directory (PACKAGE_SOURCE_DIR "/pixmaps"); 1461 --- 60 unchanged lines hidden --- | 1450 /* GTK stuffs */ 1451 gtk_set_locale(); 1452 gtk_init(&ac, &av); 1453 glade_init(); 1454 1455 //add_pixmap_directory (PACKAGE_DATA_DIR "/" PACKAGE "/pixmaps"); 1456 //add_pixmap_directory (PACKAGE_SOURCE_DIR "/pixmaps"); 1457 --- 60 unchanged lines hidden --- |