[Author Prev][Author Next][Thread Prev][Thread Next][Author Index][Thread Index]
gEDA-cvs: CVS update: Makefile.am
User: ahvezda
Date: 06/08/06 12:45:28
Modified: . Makefile.am gattrib.c s_toplevel.c s_visibility.c
x_dialog.c x_fileselect.c x_gtksheet.c x_window.c
Removed: . gtkitementry_1_2.c gtksheet_1_2.c
Log:
Applied Patch#1533798: Remove pre-GTK2 code from geda by Peter Brett. Thanks.
GTK+ 1.2.x specific code is now completely gone from gEDA/gaf.
Revision Changes Path
1.7 +0 -28 eda/geda/gaf/gattrib/src/Makefile.am
(In the diff below, changes in quantity of whitespace are not shown.)
Index: Makefile.am
===================================================================
RCS file: /home/cvspsrv/cvsroot/eda/geda/gaf/gattrib/src/Makefile.am,v
retrieving revision 1.6
retrieving revision 1.7
diff -u -b -r1.6 -r1.7
--- Makefile.am 26 Jul 2006 22:56:39 -0000 1.6
+++ Makefile.am 6 Aug 2006 16:45:28 -0000 1.7
@@ -8,7 +8,6 @@
bin_PROGRAMS = gattrib
## don't forget all *.h files */
-if GTK22_SOURCE
gattrib_SOURCES = \
gtksheet_2_2.c \
gtkextra-marshal.c \
@@ -35,33 +34,6 @@
s_toplevel.c \
s_visibility.c \
gattrib.c
-else
-gattrib_SOURCES = \
- gtksheet_1_2.c \
- gtkitementry_1_2.c \
- globals.c \
- listsort.c \
- parsecmd.c \
- f_export.c \
- g_register.c \
- g_rc.c \
- i_vars.c \
- i_basic.c \
- x_window.c \
- x_gtksheet.c \
- x_dialog.c \
- x_fileselect.c \
- s_rename.c \
- s_misc.c \
- s_string_list.c \
- s_sheet_data.c \
- s_table.c \
- s_object.c \
- s_attrib.c \
- s_toplevel.c \
- s_visibility.c \
- gattrib.c
-endif
INCLUDES = -I$(top_srcdir)/include @GATTRIB_CFLAGS@
1.17 +0 -4 eda/geda/gaf/gattrib/src/gattrib.c
(In the diff below, changes in quantity of whitespace are not shown.)
Index: gattrib.c
===================================================================
RCS file: /home/cvspsrv/cvsroot/eda/geda/gaf/gattrib/src/gattrib.c,v
retrieving revision 1.16
retrieving revision 1.17
diff -u -b -r1.16 -r1.17
--- gattrib.c 17 Jul 2006 01:50:09 -0000 1.16
+++ gattrib.c 6 Aug 2006 16:45:28 -0000 1.17
@@ -47,9 +47,7 @@
#include <gdk/gdkkeysyms.h>
#include <glib.h>
-#ifdef HAS_GTK22
#include <glib-object.h>
-#endif
#ifdef HAVE_STRING_H
#include <string.h>
@@ -377,10 +375,8 @@
setlocale(LC_ALL, "");
bindtextdomain(PACKAGE, LOCALEDIR);
textdomain(PACKAGE);
-#ifdef HAS_GTK22
bind_textdomain_codeset(PACKAGE, "UTF-8");
#endif
-#endif
/* disable the deprecated warnings in guile 1.6.3 */
/* Eventually the warnings will need to be fixed */
1.17 +1 -7 eda/geda/gaf/gattrib/src/s_toplevel.c
(In the diff below, changes in quantity of whitespace are not shown.)
Index: s_toplevel.c
===================================================================
RCS file: /home/cvspsrv/cvsroot/eda/geda/gaf/gattrib/src/s_toplevel.c,v
retrieving revision 1.16
retrieving revision 1.17
diff -u -b -r1.16 -r1.17
--- s_toplevel.c 28 Jul 2006 04:29:16 -0000 1.16
+++ s_toplevel.c 6 Aug 2006 16:45:28 -0000 1.17
@@ -1,4 +1,4 @@
-/* $Id: s_toplevel.c,v 1.16 2006/07/28 04:29:16 danmc Exp $ */
+/* $Id: s_toplevel.c,v 1.17 2006/08/06 16:45:28 ahvezda Exp $ */
/* gEDA - GPL Electronic Design Automation
* gattrib -- gEDA component and net attribute manipulation using spreadsheet.
@@ -382,11 +382,6 @@
/* Rebuild the gattrib-specific data structures */
switch (cur_page) {
-#ifdef HAS_GTK22
-/* The above #ifdef is very heavy handed and was add by Ales to get gattrib
- * to build using gtk12. gtk_sheet_column_button_get_label is not defined
- * in the gtksheet_1_2.c. This should be fixed properly at some point. TBD
- */
case 0: /* component attribute */
/* Eventually, I want to just resize the table after deleting the
@@ -432,7 +427,6 @@
printf("In s_toplevel_delete_attrib_col, just updated SHEET_DATA info.\n");
#endif
break;
-#endif
case 1: /* net attribute */
/* insert into net attribute list */
1.2 +0 -7 eda/geda/gaf/gattrib/src/s_visibility.c
(In the diff below, changes in quantity of whitespace are not shown.)
Index: s_visibility.c
===================================================================
RCS file: /home/cvspsrv/cvsroot/eda/geda/gaf/gattrib/src/s_visibility.c,v
retrieving revision 1.1
retrieving revision 1.2
diff -u -b -r1.1 -r1.2
--- s_visibility.c 14 Jul 2005 17:29:24 -0000 1.1
+++ s_visibility.c 6 Aug 2006 16:45:28 -0000 1.2
@@ -35,9 +35,7 @@
#include <gdk/gdkkeysyms.h>
#include <glib.h>
-#ifdef HAS_GTK22
#include <glib-object.h>
-#endif
#include <sys/types.h>
@@ -61,13 +59,8 @@
-#ifdef HAS_GTK22
#include "gtksheet_2_2.h"
#include "gtkitementry_2_2.h"
-#else
-#include "gtksheet_1_2.h"
-#include "gtkitementry_1_2.h"
-#endif
/*------------------------------------------------------------------
* Gattrib specific includes
1.21 +1 -92 eda/geda/gaf/gattrib/src/x_dialog.c
(In the diff below, changes in quantity of whitespace are not shown.)
Index: x_dialog.c
===================================================================
RCS file: /home/cvspsrv/cvsroot/eda/geda/gaf/gattrib/src/x_dialog.c,v
retrieving revision 1.20
retrieving revision 1.21
diff -u -b -r1.20 -r1.21
--- x_dialog.c 28 Jul 2006 04:32:32 -0000 1.20
+++ x_dialog.c 6 Aug 2006 16:45:28 -0000 1.21
@@ -1,4 +1,4 @@
-/* $Id: x_dialog.c,v 1.20 2006/07/28 04:32:32 danmc Exp $ */
+/* $Id: x_dialog.c,v 1.21 2006/08/06 16:45:28 ahvezda Exp $ */
/* gEDA - GPL Electronic Design Automation
* gattrib -- gEDA component and net attribute manipulation using spreadsheet.
@@ -37,9 +37,7 @@
#include <gdk/gdkkeysyms.h>
#include <glib.h>
-#ifdef HAS_GTK22
#include <glib-object.h>
-#endif
#ifdef HAVE_STRING_H
@@ -47,13 +45,8 @@
#endif
-#ifdef HAS_GTK22
#include "gtksheet_2_2.h"
#include "gtkitementry_2_2.h"
-#else
-#include "gtksheet_1_2.h"
-#include "gtkitementry_1_2.h"
-#endif
/*------------------------------------------------------------------
@@ -91,11 +84,7 @@
newattrib_window = x_dialog_create_dialog_box(&vbox, &action_area);
gtk_window_position(GTK_WINDOW(newattrib_window),
GTK_WIN_POS_MOUSE);
-#ifdef HAS_GTK22
gtk_widget_set_size_request (GTK_WIDGET(newattrib_window), 400, 150);
-#else
- gtk_widget_set_usize(GTK_WIDGET(newattrib_window), 400, 150);
-#endif
gtk_window_set_title(GTK_WINDOW(newattrib_window), "Enter new attribute name");
gtk_container_border_width(GTK_CONTAINER(newattrib_window), 5);
@@ -113,11 +102,7 @@
label = gtk_label_new (_("Enter new attribute name"));
gtk_widget_show (label);
gtk_box_pack_start (GTK_BOX(vbox), label, FALSE, FALSE, 0);
-#ifdef HAS_GTK22
gtk_widget_set_size_request (label, 127, 50);
-#else
- gtk_widget_set_usize (label, 127, 50);
-#endif
/* Create the "attrib" text entry area */
@@ -126,11 +111,7 @@
-1);
gtk_box_pack_start(GTK_BOX(vbox), attrib_entry, TRUE,
TRUE, 5);
-#ifdef HAS_GTK22
gtk_widget_set_size_request (GTK_WIDGET (attrib_entry), 400, 20);
-#else
- gtk_widget_set_usize (GTK_WIDGET (attrib_entry), 400, 20);
-#endif
gtk_object_set_data(GTK_OBJECT(newattrib_window), "attrib_entry",
attrib_entry); /* here we make the string "attrib_entry" point
@@ -139,11 +120,7 @@
/* Now create "OK" and "cancel" buttons */
-#ifdef HAS_GTK12
- buttonok = gtk_button_new_with_label("OK");
-#else
buttonok = gtk_button_new_from_stock (GTK_STOCK_OK);
-#endif
GTK_WIDGET_SET_FLAGS(buttonok, GTK_CAN_DEFAULT); /* what does this do? */
gtk_box_pack_start(GTK_BOX(action_area), buttonok, FALSE, FALSE, 0);
gtk_signal_connect(GTK_OBJECT(buttonok), "clicked",
@@ -152,11 +129,7 @@
gtk_widget_show(buttonok);
-#ifdef HAS_GTK12
- buttoncancel = gtk_button_new_with_label("Cancel");
-#else
buttoncancel = gtk_button_new_from_stock (GTK_STOCK_CANCEL);
-#endif
gtk_box_pack_start(GTK_BOX(action_area), buttoncancel, FALSE, FALSE, 0);
gtk_signal_connect(GTK_OBJECT(buttoncancel), "clicked",
GTK_SIGNAL_FUNC(x_dialog_newattrib_close_callback),
@@ -281,11 +254,7 @@
delattrib_window = x_dialog_create_dialog_box(&vbox, &action_area);
gtk_window_position(GTK_WINDOW(delattrib_window),
GTK_WIN_POS_MOUSE);
-#ifdef HAS_GTK22
gtk_widget_set_size_request (GTK_WIDGET(delattrib_window), 400, 150);
-#else
- gtk_widget_set_usize (GTK_WIDGET(delattrib_window), 400, 150);
-#endif
gtk_window_set_title(GTK_WINDOW(delattrib_window), "Are you sure?");
gtk_container_border_width(GTK_CONTAINER(delattrib_window), 5);
@@ -303,19 +272,11 @@
label = gtk_label_new (_("Are you sure you want to delete this attribute?"));
gtk_widget_show (label);
gtk_box_pack_start (GTK_BOX(vbox), label, FALSE, FALSE, 0);
-#ifdef HAS_GTK22
gtk_widget_set_size_request (label, 127, 50);
-#else
- gtk_widget_set_usize (label, 127, 50);
-#endif
/* Now create "Yes" and "cancel" buttons */
-#ifdef HAS_GTK12
- buttonyes = gtk_button_new_with_label("Yes");
-#else
buttonyes = gtk_button_new_from_stock (GTK_STOCK_YES);
-#endif
GTK_WIDGET_SET_FLAGS(buttonyes, GTK_CAN_DEFAULT); /* what does this do? */
gtk_box_pack_start(GTK_BOX(action_area), buttonyes, FALSE, FALSE, 0);
gtk_signal_connect(GTK_OBJECT(buttonyes), "clicked",
@@ -324,11 +285,7 @@
gtk_widget_show(buttonyes);
-#ifdef HAS_GTK12
- buttoncancel = gtk_button_new_with_label("Cancel");
-#else
buttoncancel = gtk_button_new_from_stock (GTK_STOCK_CANCEL);
-#endif
gtk_box_pack_start(GTK_BOX(action_area), buttoncancel, FALSE, FALSE, 0);
gtk_signal_connect(GTK_OBJECT(buttoncancel), "clicked",
GTK_SIGNAL_FUNC(x_dialog_delattrib_close_callback),
@@ -466,11 +423,7 @@
gtk_box_pack_start (GTK_BOX(vbox), label, FALSE, FALSE, 0);
/* Now create "Abort program" and "Continue" buttons */
-#ifdef HAS_GTK12
- buttonabort = gtk_button_new_with_label("Quit");
-#else
buttonabort = gtk_button_new_from_stock (GTK_STOCK_QUIT);
-#endif
GTK_WIDGET_SET_FLAGS(buttonabort, GTK_CAN_DEFAULT); /* what does this do? */
gtk_box_pack_start(GTK_BOX(action_area), buttonabort, FALSE, FALSE, 0);
gtk_signal_connect(GTK_OBJECT(buttonabort), "clicked",
@@ -479,11 +432,7 @@
gtk_widget_show(buttonabort);
-#ifdef HAS_GTK12
- buttoncontinue = gtk_button_new_with_label("Forward");
-#else
buttoncontinue = gtk_button_new_from_stock (GTK_STOCK_GO_FORWARD);
-#endif
gtk_box_pack_start(GTK_BOX(action_area), buttoncontinue, FALSE, FALSE, 0);
gtk_signal_connect(GTK_OBJECT(buttoncontinue), "clicked",
GTK_SIGNAL_FUNC(x_dialog_missing_sym_continue_callback),
@@ -608,11 +557,7 @@
gtk_box_pack_start (GTK_BOX(vbox), label, FALSE, FALSE, 0);
/* Now create "Abort program" and "Continue" buttons */
-#ifdef HAS_GTK12
- buttonabort = gtk_button_new_with_label("Stop");
-#else
buttonabort = gtk_button_new_from_stock (GTK_STOCK_STOP);
-#endif
GTK_WIDGET_SET_FLAGS(buttonabort, GTK_CAN_DEFAULT); /* what does this do? */
gtk_box_pack_start(GTK_BOX(action_area), buttonabort, FALSE, FALSE, 0);
gtk_signal_connect(GTK_OBJECT(buttonabort), "clicked",
@@ -621,11 +566,7 @@
gtk_widget_show(buttonabort);
-#ifdef HAS_GTK12
- buttoncontinue = gtk_button_new_with_label("Quit");
-#else
buttoncontinue = gtk_button_new_from_stock (GTK_STOCK_QUIT);
-#endif
gtk_box_pack_start(GTK_BOX(action_area), buttoncontinue, FALSE, FALSE, 0);
gtk_signal_connect(GTK_OBJECT(buttoncontinue), "clicked",
GTK_SIGNAL_FUNC(x_dialog_unsaved_data_continue_callback),
@@ -757,11 +698,7 @@
gtk_widget_show(label);
/* Now create button to stick in action area */
-#ifdef HAS_GTK12
- buttonclose = gtk_button_new_with_label("Close");
-#else
buttonclose = gtk_button_new_from_stock (GTK_STOCK_CLOSE);
-#endif
GTK_WIDGET_SET_FLAGS(buttonclose, GTK_CAN_DEFAULT);
gtk_box_pack_start(GTK_BOX(action_area), buttonclose, FALSE, FALSE, 0);
gtk_signal_connect(GTK_OBJECT(buttonclose), "clicked",
@@ -770,11 +707,7 @@
/* Remove bad size for widget */
#if 0
-#ifdef HAS_GTK22
gtk_widget_set_size_request (GTK_WIDGET (buttonclose), 50, 30);
-#else
- gtk_widget_set_usize (GTK_WIDGET (buttonclose), 50, 30);
-#endif
#endif
gtk_widget_show(buttonclose);
@@ -874,11 +807,7 @@
gtk_widget_show(label);
/* Now create button to stick in action area */
-#ifdef HAS_GTK12
- buttonclose = gtk_button_new_with_label("Close");
-#else
buttonclose = gtk_button_new_from_stock (GTK_STOCK_CLOSE);
-#endif
GTK_WIDGET_SET_FLAGS(buttonclose, GTK_CAN_DEFAULT);
gtk_box_pack_start(GTK_BOX(action_area), buttonclose, FALSE, FALSE, 0);
gtk_signal_connect(GTK_OBJECT(buttonclose), "clicked",
@@ -919,11 +848,7 @@
export_filename_window = x_dialog_create_dialog_box(&vbox, &action_area);
gtk_window_position(GTK_WINDOW(export_filename_window),
GTK_WIN_POS_MOUSE);
-#ifdef HAS_GTK22
gtk_widget_set_size_request (GTK_WIDGET(export_filename_window), 400, 150);
-#else
- gtk_widget_set_usize(GTK_WIDGET(export_filename_window), 400, 150);
-#endif
gtk_window_set_title(GTK_WINDOW(export_filename_window), "Export filename?");
gtk_container_border_width(GTK_CONTAINER(export_filename_window), 5);
@@ -954,11 +879,7 @@
gtk_widget_show (label);
gtk_box_pack_start (GTK_BOX(vbox), label, FALSE, FALSE, 0);
-#ifdef HAS_GTK22
gtk_widget_set_size_request (label, 127, 50);
-#else
- gtk_widget_set_usize (label, 127, 50);
-#endif
/* Create the "filenname" text entry area */
@@ -967,11 +888,7 @@
-1);
gtk_box_pack_start(GTK_BOX(vbox), filename_entry, TRUE,
TRUE, 5);
-#ifdef HAS_GTK22
gtk_widget_set_size_request (GTK_WIDGET (filename_entry), 400, 20);
-#else
- gtk_widget_set_usize (GTK_WIDGET (filename_entry), 400, 20);
-#endif
gtk_object_set_data(GTK_OBJECT(export_filename_window), "filename_entry",
filename_entry); /* here we make the string "filename_entry" point
@@ -981,11 +898,7 @@
/* Now create "OK" and "cancel" buttons */
-#ifdef HAS_GTK12
- buttonok = gtk_button_new_with_label("OK");
-#else
buttonok = gtk_button_new_from_stock (GTK_STOCK_OK);
-#endif
GTK_WIDGET_SET_FLAGS(buttonok, GTK_CAN_DEFAULT); /* what does this do? */
gtk_box_pack_start(GTK_BOX(action_area), buttonok, FALSE, FALSE, 0);
gtk_signal_connect(GTK_OBJECT(buttonok), "clicked",
@@ -994,11 +907,7 @@
gtk_widget_show(buttonok);
-#ifdef HAS_GTK12
- buttoncancel = gtk_button_new_with_label("Cancel");
-#else
buttoncancel = gtk_button_new_from_stock (GTK_STOCK_CANCEL);
-#endif
gtk_box_pack_start(GTK_BOX(action_area), buttoncancel, FALSE, FALSE, 0);
gtk_signal_connect(GTK_OBJECT(buttoncancel), "clicked",
GTK_SIGNAL_FUNC(x_dialog_export_file_close_callback),
1.11 +0 -33 eda/geda/gaf/gattrib/src/x_fileselect.c
(In the diff below, changes in quantity of whitespace are not shown.)
Index: x_fileselect.c
===================================================================
RCS file: /home/cvspsrv/cvsroot/eda/geda/gaf/gattrib/src/x_fileselect.c,v
retrieving revision 1.10
retrieving revision 1.11
diff -u -b -r1.10 -r1.11
--- x_fileselect.c 17 Jul 2006 01:50:10 -0000 1.10
+++ x_fileselect.c 6 Aug 2006 16:45:28 -0000 1.11
@@ -36,9 +36,7 @@
#include <gdk/gdkkeysyms.h>
#include <glib.h>
-#ifdef HAS_GTK22
#include <glib-object.h>
-#endif
#include <sys/types.h>
@@ -62,13 +60,8 @@
-#ifdef HAS_GTK22
#include "gtksheet_2_2.h"
#include "gtkitementry_2_2.h"
-#else
-#include "gtksheet_1_2.h"
-#include "gtkitementry_1_2.h"
-#endif
/*------------------------------------------------------------------
* Gattrib specific includes
@@ -472,14 +465,9 @@
text[0] = temp;
gtk_clist_append(GTK_CLIST(f_current->dir_list), text);
-#ifdef HAS_GTK22
width =
gdk_string_width(gtk_style_get_font(f_current->dir_list->style),
f_current->directory_entries[i]);
-#else
- width = gdk_string_width(f_current->dir_list->style->font,
- f_current->directory_entries[i]);
-#endif
if (width > max_width) {
gtk_clist_set_column_width(GTK_CLIST(f_current->dir_list), 0, width);
@@ -497,14 +485,9 @@
text[0] = f_current->file_entries[i];
gtk_clist_append(GTK_CLIST(f_current->file_list), text);
-#ifdef HAS_GTK22
width =
gdk_string_width(gtk_style_get_font(f_current->dir_list->style),
f_current->file_entries[i]);
-#else
- width = gdk_string_width(f_current->dir_list->style->font,
- f_current->file_entries[i]);
-#endif
if (width > max_width) {
gtk_clist_set_column_width(GTK_CLIST(f_current->
@@ -1384,11 +1367,7 @@
/* ----- Here we create the "open"/"save as"/"apply" buttons ----- */
if (filesel_type == OPEN) {
-#ifdef HAS_GTK12
- buttonapply = gtk_button_new_with_label("Open");
-#else
buttonapply = gtk_button_new_from_stock (GTK_STOCK_OPEN);
-#endif
gtk_signal_connect(GTK_OBJECT(buttonapply),
"clicked",
GTK_SIGNAL_FUNC(x_fileselect_open_file),
@@ -1400,11 +1379,7 @@
(filesel_type == SAVEAS_OPEN) ||
(filesel_type == SAVEAS_CLOSE) ||
(filesel_type == SAVEAS_NEW)) {
-#ifdef HAS_GTK12
- buttonapply = gtk_button_new_with_label("SaveAs");
-#else
buttonapply = gtk_button_new_from_stock (GTK_STOCK_SAVE_AS);
-#endif
gtk_signal_connect(GTK_OBJECT(buttonapply),
"clicked",
GTK_SIGNAL_FUNC(x_fileselect_saveas), f_current);
@@ -1418,11 +1393,7 @@
/* ----- Here we create the "cancel"/"close" buttons ----- */
if (filesel_type == OPEN) {
-#ifdef HAS_GTK12
- buttonclose = gtk_button_new_with_label("Cancel");
-#else
buttonclose = gtk_button_new_from_stock (GTK_STOCK_CANCEL);
-#endif
GTK_WIDGET_SET_FLAGS(buttonclose, GTK_CAN_DEFAULT);
gtk_box_pack_start(GTK_BOX(action_area),
buttonclose, TRUE, TRUE, 0);
@@ -1438,11 +1409,7 @@
(filesel_type == SAVEAS_OPEN) ||
(filesel_type == SAVEAS_CLOSE) ||
(filesel_type == SAVEAS_NEW)) {
-#ifdef HAS_GTK12
- buttonclose = gtk_button_new_with_label("Cancel");
-#else
buttonclose = gtk_button_new_from_stock (GTK_STOCK_CLOSE);
-#endif
GTK_WIDGET_SET_FLAGS(buttonclose, GTK_CAN_DEFAULT);
gtk_box_pack_start(GTK_BOX(action_area),
buttonclose, TRUE, TRUE, 0);
1.10 +0 -57 eda/geda/gaf/gattrib/src/x_gtksheet.c
(In the diff below, changes in quantity of whitespace are not shown.)
Index: x_gtksheet.c
===================================================================
RCS file: /home/cvspsrv/cvsroot/eda/geda/gaf/gattrib/src/x_gtksheet.c,v
retrieving revision 1.9
retrieving revision 1.10
diff -u -b -r1.9 -r1.10
--- x_gtksheet.c 17 Jul 2006 01:50:10 -0000 1.9
+++ x_gtksheet.c 6 Aug 2006 16:45:28 -0000 1.10
@@ -37,23 +37,15 @@
#include <gdk/gdkkeysyms.h>
#include <glib.h>
-#ifdef HAS_GTK22
#include <glib-object.h>
-#endif
#ifdef HAVE_STRING_H
#include <string.h>
#endif
-#ifdef HAS_GTK22
#include "gtksheet_2_2.h"
#include "gtkitementry_2_2.h"
-#else
-#include "gtksheet_1_2.h"
-#include "gtkitementry_1_2.h"
-#endif
-
/*------------------------------------------------------------------
* Gattrib specific includes
@@ -82,10 +74,6 @@
"Nets",
"Pins"};
-#ifndef HAS_GTK22
- GtkSheetRange *Range;
- Range = g_malloc(sizeof(GtkSheetRange));
-#endif
/* --- Create three new sheets. were malloc'ed in x_window_init --- */
@@ -115,30 +103,14 @@
printf("In x_gtksheet_init, creating net sheet. . . .\n");
#endif
sheets[1] = (GtkSheet *) gtk_sheet_new(sheet_head->net_count, sheet_head->net_attrib_count, "Nets");
-#ifdef HAS_GTK22
gtk_sheet_set_locked(GTK_SHEET(sheets[1]), TRUE); /* disallow editing of attribs for now */
-#else
- Range->row0 = 0;
- Range->col0 = 0;
- Range->rowi = sheet_head->net_count;
- Range->coli = sheet_head->net_attrib_count;
- gtk_sheet_range_set_editable(sheets[1], Range, FALSE);
-#endif
} else {
sheets[1] = (GtkSheet *) gtk_sheet_new(1, 1, "Nets");
gtk_sheet_row_button_add_label(sheets[1], 0, "TBD");
gtk_sheet_row_button_justify(sheets[1], 0, GTK_JUSTIFY_LEFT);
gtk_sheet_column_button_add_label(sheets[1], 0, "TBD");
gtk_sheet_column_button_justify(sheets[1], 0, GTK_JUSTIFY_LEFT);
-#ifdef HAS_GTK22
gtk_sheet_set_locked(GTK_SHEET(sheets[1]), TRUE); /* disallow editing of attribs for now */
-#else
- Range->row0 = 0;
- Range->col0 = 0;
- Range->rowi = 0;
- Range->coli = 0;
- gtk_sheet_range_set_editable(sheets[1], Range, FALSE);
-#endif
#ifdef DEBUG
fflush(stderr);
fflush(stdout);
@@ -155,26 +127,10 @@
printf("In x_gtksheet_init, creating pin sheet. . . .\n");
#endif
sheets[2] = (GtkSheet *) gtk_sheet_new(sheet_head->pin_count, sheet_head->pin_attrib_count, "Pins");
-#ifdef HAS_GTK22
gtk_sheet_set_locked(GTK_SHEET(sheets[2]), TRUE); /* disallow editing of attribs for now */
-#else
- Range->row0 = 0;
- Range->col0 = 0;
- Range->rowi = sheet_head->pin_count;
- Range->coli = sheet_head->pin_attrib_count;
- gtk_sheet_range_set_editable(sheets[2], Range, FALSE);
-#endif
} else {
sheets[2] = (GtkSheet *) gtk_sheet_new(1, 1, "Pins");
-#ifdef HAS_GTK22
gtk_sheet_set_locked(GTK_SHEET(sheets[2]), TRUE); /* disallow editing of attribs for now */
-#else
- Range->row0 = 0;
- Range->col0 = 0;
- Range->rowi = sheet_head->pin_count;
- Range->coli = sheet_head->pin_attrib_count;
- gtk_sheet_range_set_editable(sheets[2], Range, FALSE);
-#endif
#ifdef DEBUG
fflush(stderr);
fflush(stdout);
@@ -183,11 +139,6 @@
}
-#ifndef HAS_GTK22
- /* Don't need this anymore */
- g_free(Range);
-#endif
-
/* --- Finally stick labels on the notebooks holding the two sheets. --- */
for(i=0; i<NUM_SHEETS; i++){
@@ -267,14 +218,10 @@
/* Get character width based upon "X", which is a large char.
* font_combo is a global. Where is it set? */
-#ifdef HAS_GTK22
if ( GTK_WIDGET(sheet)->style->private_font )
char_width = gdk_char_width (GTK_WIDGET(sheet)->style->private_font, (gchar)'X');
else
char_width = 12;
-#else
- char_width = gdk_char_width(GTK_WIDGET(sheet)->style->font, (gchar)'X');
-#endif
string_list_item = list_head;
for (j = 0; j < count; j++) {
@@ -397,11 +344,7 @@
cell_width=sheet->column[sheet->active_cell.col].width;
-#ifdef HAS_GTK22
char_width = gdk_char_width (GTK_WIDGET(sheet)->style->private_font,(gchar)'X');
-#else
- char_width = gdk_char_width(GTK_WIDGET(sheet)->style->font, (gchar)'X');
-#endif
space= (double)cell_width/(double)char_width;
1.9 +0 -7 eda/geda/gaf/gattrib/src/x_window.c
(In the diff below, changes in quantity of whitespace are not shown.)
Index: x_window.c
===================================================================
RCS file: /home/cvspsrv/cvsroot/eda/geda/gaf/gattrib/src/x_window.c,v
retrieving revision 1.8
retrieving revision 1.9
diff -u -b -r1.8 -r1.9
--- x_window.c 17 Jul 2006 01:50:10 -0000 1.8
+++ x_window.c 6 Aug 2006 16:45:28 -0000 1.9
@@ -38,22 +38,15 @@
#include <gdk/gdkkeysyms.h>
#include <glib.h>
-#ifdef HAS_GTK22
#include <glib-object.h>
-#endif
#ifdef HAVE_STRING_H
#include <string.h>
#endif
-#ifdef HAS_GTK22
#include "gtksheet_2_2.h"
#include "gtkitementry_2_2.h"
-#else
-#include "gtksheet_1_2.h"
-#include "gtkitementry_1_2.h"
-#endif
/*------------------------------------------------------------------
* Gattrib specific includes
_______________________________________________
geda-cvs mailing list
geda-cvs@xxxxxxxxxxxxxx
http://www.seul.org/cgi-bin/mailman/listinfo/geda-cvs