aboutsummaryrefslogtreecommitdiffstats
path: root/x11/gtkchtheme
diff options
context:
space:
mode:
authorvs <vs@FreeBSD.org>2004-06-23 18:50:57 +0800
committervs <vs@FreeBSD.org>2004-06-23 18:50:57 +0800
commit7e1cb3fa35d5e6c60716eb32ce36ff8fc6981c5b (patch)
tree5b9d8a3ed2d26dea983ed3970c070b9a5fb6e75b /x11/gtkchtheme
parentb5de2ccb1fe1266664fc805db880687aa12b6281 (diff)
downloadfreebsd-ports-gnome-7e1cb3fa35d5e6c60716eb32ce36ff8fc6981c5b.tar.gz
freebsd-ports-gnome-7e1cb3fa35d5e6c60716eb32ce36ff8fc6981c5b.tar.zst
freebsd-ports-gnome-7e1cb3fa35d5e6c60716eb32ce36ff8fc6981c5b.zip
C89-ify for 4.x
Diffstat (limited to 'x11/gtkchtheme')
-rw-r--r--x11/gtkchtheme/files/patch-about_dialog.c28
-rw-r--r--x11/gtkchtheme/files/patch-font_sel.c24
-rw-r--r--x11/gtkchtheme/files/patch-main.c33
-rw-r--r--x11/gtkchtheme/files/patch-mainwin.c36
-rw-r--r--x11/gtkchtheme/files/patch-preview_pane.c56
-rw-r--r--x11/gtkchtheme/files/patch-theme_sel.c52
-rw-r--r--x11/gtkchtheme/files/patch-util.c15
7 files changed, 244 insertions, 0 deletions
diff --git a/x11/gtkchtheme/files/patch-about_dialog.c b/x11/gtkchtheme/files/patch-about_dialog.c
new file mode 100644
index 000000000000..54bbe8a03866
--- /dev/null
+++ b/x11/gtkchtheme/files/patch-about_dialog.c
@@ -0,0 +1,28 @@
+--- about_dialog.c.orig Wed Jun 23 11:37:15 2004
++++ about_dialog.c Wed Jun 23 11:38:24 2004
+@@ -37,21 +37,22 @@
+
+ void show_about_dialog(void) {
+ GtkWidget* about_dlg = gtk_dialog_new();
++ GtkWidget* about, *box, *ok_button;
+ gtk_window_set_title(GTK_WINDOW(about_dlg), "About");
+ gtk_window_set_resizable(GTK_WINDOW(about_dlg), FALSE);
+ gtk_dialog_set_has_separator(GTK_DIALOG(about_dlg), FALSE);
+ gtk_container_set_border_width(GTK_CONTAINER(GTK_DIALOG(about_dlg)->vbox), 20);
+
+- GtkWidget* about = GTK_WIDGET(gtk_label_new_from_pango_markup((ABOUT), GTK_JUSTIFY_CENTER));
++ about = GTK_WIDGET(gtk_label_new_from_pango_markup((ABOUT), GTK_JUSTIFY_CENTER));
+
+- GtkWidget* box = gtk_hbox_new(FALSE, 0);
++ box = gtk_hbox_new(FALSE, 0);
+ gtk_container_set_border_width(GTK_CONTAINER(box), 20);
+ gtk_box_pack_start(GTK_BOX(box), about, FALSE, FALSE, 10);
+ gtk_widget_show_all(box);
+
+ gtk_box_pack_start(GTK_BOX(GTK_DIALOG(about_dlg)->vbox), box, FALSE, FALSE, 10);
+
+- GtkWidget* ok_button = gtk_dialog_add_button(GTK_DIALOG(about_dlg), GTK_STOCK_OK, 0);
++ ok_button = gtk_dialog_add_button(GTK_DIALOG(about_dlg), GTK_STOCK_OK, 0);
+ gtk_button_set_use_stock(GTK_BUTTON(ok_button), TRUE);
+
+ gtk_dialog_run(GTK_DIALOG(about_dlg));
diff --git a/x11/gtkchtheme/files/patch-font_sel.c b/x11/gtkchtheme/files/patch-font_sel.c
new file mode 100644
index 000000000000..bba365e1120f
--- /dev/null
+++ b/x11/gtkchtheme/files/patch-font_sel.c
@@ -0,0 +1,24 @@
+--- font_sel.c.orig Sat Feb 7 04:50:09 2004
++++ font_sel.c Wed Jun 23 11:57:33 2004
+@@ -27,17 +27,19 @@
+
+ static void font_browse_clicked(GtkWidget *widget, gpointer u)
+ {
++ const gchar *curfont;
++ gboolean is_confirmed = FALSE;
++
+ GtkFontSelectionDialog *font_dlg =
+ GTK_FONT_SELECTION_DIALOG(gtk_font_selection_dialog_new("Select Font"));
+
+ gtk_font_selection_dialog_set_preview_text(font_dlg, PROJNAME);
+
+- const gchar *curfont = gtk_entry_get_text(GTK_ENTRY(font_entry));
++ curfont = gtk_entry_get_text(GTK_ENTRY(font_entry));
+
+ if (g_utf8_strlen(curfont, -1))
+ gtk_font_selection_dialog_set_font_name(font_dlg, curfont);
+
+- gboolean is_confirmed = FALSE;
+
+ g_signal_connect(G_OBJECT(font_dlg->ok_button), "clicked",
+ G_CALLBACK(font_dlg_ok_clicked), &is_confirmed);
diff --git a/x11/gtkchtheme/files/patch-main.c b/x11/gtkchtheme/files/patch-main.c
new file mode 100644
index 000000000000..1613f819437f
--- /dev/null
+++ b/x11/gtkchtheme/files/patch-main.c
@@ -0,0 +1,33 @@
+--- main.c.orig Wed Jun 23 11:39:35 2004
++++ main.c Wed Jun 23 11:54:03 2004
+@@ -75,15 +75,18 @@
+
+ void apply_new_look(gboolean is_preview)
+ {
++ FILE *gtkrc_fh;
++ gchar *include_file;
++ gchar *default_files[2];
+ if(!themename) return;
+
+ cleanup_temporary();
+
+- FILE *gtkrc_fh = is_preview
++ gtkrc_fh = is_preview
+ ? fdopen(g_file_open_tmp("gtkrc.preview-XXXXXXXX", &tmp_rc, NULL), "w+")
+ : fopen(gtkrc, "w");
+
+- gchar *include_file = g_hash_table_lookup(hash, themename);
++ include_file = g_hash_table_lookup(hash, themename);
+
+ fprintf(gtkrc_fh,
+ "# -- THEME AUTO-WRITTEN DO NOT EDIT\n" "include \"%s\"\n\n",
+@@ -101,7 +104,8 @@
+ fprintf(gtkrc_fh, "# -- THEME AUTO-WRITTEN DO NOT EDIT\n");
+ fclose(gtkrc_fh);
+
+- gchar *default_files[] = { is_preview ? tmp_rc : gtkrc, NULL };
++ default_files[0] = is_preview ? tmp_rc : gtkrc;
++ default_files[1] = NULL;
+ gtk_rc_set_default_files(default_files);
+
+ if (is_preview)
diff --git a/x11/gtkchtheme/files/patch-mainwin.c b/x11/gtkchtheme/files/patch-mainwin.c
new file mode 100644
index 000000000000..d38d8ff9dfac
--- /dev/null
+++ b/x11/gtkchtheme/files/patch-mainwin.c
@@ -0,0 +1,36 @@
+--- mainwin.c.orig Wed Jun 23 11:38:32 2004
++++ mainwin.c Wed Jun 23 11:39:27 2004
+@@ -42,6 +42,7 @@
+ GtkWidget* create_mainwin(void)
+ {
+ GtkWidget *mainwin = gtk_dialog_new();
++ GtkWidget *about_button, *apply_button, *ok_button, *cancel_button;
+ gtk_widget_realize(mainwin);
+ gtk_window_set_title(GTK_WINDOW(mainwin), PROJNAME);
+ gtk_window_set_resizable(GTK_WINDOW(mainwin), TRUE);
+@@ -54,21 +55,21 @@
+ gtk_box_pack_start(GTK_BOX(GTK_DIALOG(mainwin)->vbox), gtk_hseparator_new(), FALSE, FALSE, 0);
+ gtk_box_pack_start(GTK_BOX(GTK_DIALOG(mainwin)->vbox), create_font_sel(), FALSE, FALSE, 0);
+
+- GtkWidget* about_button = gtk_button_new_from_stock(GTK_STOCK_ABOUT);
++ about_button = gtk_button_new_from_stock(GTK_STOCK_ABOUT);
+ g_signal_connect(G_OBJECT(about_button), "clicked", G_CALLBACK(about_clicked), NULL);
+ gtk_box_pack_end(GTK_BOX(GTK_DIALOG(mainwin)->action_area), about_button, TRUE, TRUE, 0);
+
+- GtkWidget* apply_button = gtk_button_new_from_stock(GTK_STOCK_APPLY);
++ apply_button = gtk_button_new_from_stock(GTK_STOCK_APPLY);
+ g_signal_connect(G_OBJECT(apply_button), "clicked", G_CALLBACK(apply_clicked), NULL);
+ gtk_box_pack_start(GTK_BOX(GTK_DIALOG(mainwin)->action_area), apply_button, TRUE, TRUE, 0);
+ await_activation(apply_button);
+
+- GtkWidget* ok_button = gtk_button_new_from_stock(GTK_STOCK_OK);
++ ok_button = gtk_button_new_from_stock(GTK_STOCK_OK);
+ g_signal_connect(G_OBJECT(ok_button), "clicked", G_CALLBACK(ok_clicked), NULL);
+ gtk_box_pack_start(GTK_BOX(GTK_DIALOG(mainwin)->action_area), ok_button, TRUE, TRUE, 0);
+ await_activation(ok_button);
+
+- GtkWidget *cancel_button = gtk_button_new_from_stock(GTK_STOCK_CANCEL);
++ cancel_button = gtk_button_new_from_stock(GTK_STOCK_CANCEL);
+ g_signal_connect(G_OBJECT(cancel_button), "clicked", G_CALLBACK(gtk_main_quit), NULL);
+ gtk_box_pack_start(GTK_BOX(GTK_DIALOG(mainwin)->action_area), cancel_button, TRUE, TRUE, 0);
+
diff --git a/x11/gtkchtheme/files/patch-preview_pane.c b/x11/gtkchtheme/files/patch-preview_pane.c
new file mode 100644
index 000000000000..56cf045ae308
--- /dev/null
+++ b/x11/gtkchtheme/files/patch-preview_pane.c
@@ -0,0 +1,56 @@
+--- preview_pane.c.orig Wed Jun 23 11:35:18 2004
++++ preview_pane.c Wed Jun 23 11:37:07 2004
+@@ -24,16 +24,19 @@
+ GtkWidget* create_preview_pane(void)
+ {
+ GtkBox* box = GTK_BOX(unfocussable(gtk_vbox_new(FALSE, 5)));
++ GtkWidget* frame;
+
+ {
+ gint i;
++ GtkWidget *item;
++ GSList* group = NULL;
+
+ GtkWidget *menubar = unfocussable(gtk_menu_bar_new());
+
+ GtkWidget *menu = unfocussable(gtk_menu_new());
+ gtk_menu_shell_append(GTK_MENU_SHELL(menu), unfocussable(gtk_tearoff_menu_item_new()));
+
+- GtkWidget *item = unfocussable(gtk_menu_item_new_with_label("Menu"));
++ item = unfocussable(gtk_menu_item_new_with_label("Menu"));
+ gtk_menu_shell_append(GTK_MENU_SHELL(menubar), item);
+ gtk_menu_item_set_submenu(GTK_MENU_ITEM(item), menu);
+
+@@ -51,7 +54,6 @@
+
+ gtk_menu_shell_append(GTK_MENU_SHELL(menu), unfocussable(gtk_separator_menu_item_new()));
+
+- GSList* group = NULL;
+ for (i = 0; i < MENU_PREVIEW_ITEMS; i++)
+ {
+ item = unfocussable(gtk_radio_menu_item_new_with_label(group, "Radio"));
+@@ -77,6 +79,7 @@
+ {
+ GtkToolbar* toolbar = GTK_TOOLBAR(unfocussable(gtk_toolbar_new()));
+ GtkWidget* button;
++ GtkRadioButton* radio;
+
+ button = unfocussable(gtk_check_button_new_with_label("Check 1"));
+ gtk_toolbar_append_widget(toolbar, button, "Tooltip", "");
+@@ -87,7 +90,6 @@
+
+ gtk_toolbar_append_space(toolbar);
+
+- GtkRadioButton* radio;
+
+ radio = GTK_RADIO_BUTTON(unfocussable(gtk_radio_button_new_with_label(NULL, "Radio 1")));
+ gtk_toolbar_append_widget(toolbar, GTK_WIDGET(radio), "Tooltip", "");
+@@ -143,7 +145,7 @@
+ gtk_box_pack_start(box, GTK_WIDGET(hbox), FALSE, FALSE, 0);
+ }
+
+- GtkWidget* frame = unfocussable(gtk_frame_new("Preview"));
++ frame = unfocussable(gtk_frame_new("Preview"));
+ gtk_container_add(GTK_CONTAINER(frame), GTK_WIDGET(box));
+
+ return frame;
diff --git a/x11/gtkchtheme/files/patch-theme_sel.c b/x11/gtkchtheme/files/patch-theme_sel.c
new file mode 100644
index 000000000000..5121b35a1fc4
--- /dev/null
+++ b/x11/gtkchtheme/files/patch-theme_sel.c
@@ -0,0 +1,52 @@
+--- theme_sel.c.orig Wed Jun 23 11:32:31 2004
++++ theme_sel.c Wed Jun 23 11:34:15 2004
+@@ -53,6 +53,9 @@
+
+ GtkWidget *create_theme_sel(void)
+ {
++ GtkTreeSelection *selection;
++ GtkTreeViewColumn *column;
++ GtkWidget *sw;
+ GtkListStore *store = gtk_list_store_new(1, G_TYPE_STRING);
+
+ gtk_tree_sortable_set_sort_column_id(GTK_TREE_SORTABLE(store), 0,
+@@ -65,7 +68,7 @@
+ gtk_tree_view_set_rules_hint(GTK_TREE_VIEW(theme_list), TRUE);
+ gtk_tree_view_set_search_column(GTK_TREE_VIEW(theme_list), 0);
+
+- GtkTreeSelection *selection =
++ selection =
+ gtk_tree_view_get_selection(GTK_TREE_VIEW(theme_list));
+
+ gtk_tree_selection_set_mode(selection, GTK_SELECTION_BROWSE);
+@@ -81,11 +84,12 @@
+
+ do
+ {
++ GtkTreePath *p;
+ gtk_tree_model_get(GTK_TREE_MODEL(store), &iter, 0, &newtheme, -1);
+ if (strcmp(newtheme, get_theme()) != 0)
+ continue;
+
+- GtkTreePath *p = gtk_tree_model_get_path(GTK_TREE_MODEL(store), &iter);
++ p = gtk_tree_model_get_path(GTK_TREE_MODEL(store), &iter);
+
+ gtk_tree_view_set_cursor(GTK_TREE_VIEW(theme_list), p, NULL, FALSE);
+ gtk_tree_view_scroll_to_cell(GTK_TREE_VIEW(theme_list), p, NULL, TRUE, 0.5, 0);
+@@ -97,14 +101,14 @@
+
+ g_object_unref(G_OBJECT(store));
+
+- GtkTreeViewColumn *column =
++ column =
+ gtk_tree_view_column_new_with_attributes("Theme",
+ gtk_cell_renderer_text_new(), "text", 0, NULL);
+
+ gtk_tree_view_column_set_sort_column_id(column, 0);
+ gtk_tree_view_append_column(GTK_TREE_VIEW(theme_list), column);
+
+- GtkWidget *sw = gtk_scrolled_window_new(NULL, NULL);
++ sw = gtk_scrolled_window_new(NULL, NULL);
+
+ gtk_scrolled_window_set_policy(GTK_SCROLLED_WINDOW(sw),
+ GTK_POLICY_AUTOMATIC, GTK_POLICY_AUTOMATIC);
diff --git a/x11/gtkchtheme/files/patch-util.c b/x11/gtkchtheme/files/patch-util.c
new file mode 100644
index 000000000000..53f8934e6940
--- /dev/null
+++ b/x11/gtkchtheme/files/patch-util.c
@@ -0,0 +1,15 @@
+--- util.c.orig Wed Jun 23 11:31:52 2004
++++ util.c Wed Jun 23 11:32:20 2004
+@@ -34,10 +34,11 @@
+ {
+ PangoAttrList *attrs;
+ gchar* parsed_text;
++ GtkLabel* label;
+
+ pango_parse_markup(markup_text, -1, 0, &attrs, &parsed_text, NULL, NULL);
+
+- GtkLabel* label = GTK_LABEL(gtk_label_new(parsed_text));
++ label = GTK_LABEL(gtk_label_new(parsed_text));
+ gtk_label_set_attributes(label, attrs);
+ gtk_label_set_line_wrap(label, TRUE);
+ gtk_label_set_justify(label, jtype);