-
Notifications
You must be signed in to change notification settings - Fork 2
/
Copy pathinterface.c
100 lines (82 loc) · 3.83 KB
/
interface.c
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
/*
* DO NOT EDIT THIS FILE - it is generated by Glade.
*/
#ifdef HAVE_CONFIG_H
# include <config.h>
#endif
#include <sys/types.h>
#include <sys/stat.h>
#include <unistd.h>
#include <string.h>
#include <stdio.h>
#include <gdk/gdkkeysyms.h>
#include <gtk/gtk.h>
#include "callbacks.h"
#include "interface.h"
#include "support.h"
#define GLADE_HOOKUP_OBJECT(component,widget,name) \
g_object_set_data_full (G_OBJECT (component), name, \
g_object_ref(G_OBJECT(widget)), (GDestroyNotify) g_object_unref)
#define GLADE_HOOKUP_OBJECT_NO_REF(component,widget,name) \
g_object_set_data (G_OBJECT (component), name, widget)
GtkWidget*
create_dlgResults (void)
{
GtkWidget *dlgResults;
GtkWidget *dialog_vbox2;
GtkWidget *scrolledwindow1;
GtkWidget *results_table;
GtkWidget *dialog_action_area2;
GtkWidget *btn_cancel_rg;
GtkWidget *btn_apply_rg;
dlgResults = gtk_dialog_new ();
gtk_widget_set_name (dlgResults, "dlgResults");
gtk_widget_set_size_request (dlgResults, -1, 400);
gtk_window_set_title (GTK_WINDOW (dlgResults), _("Replay Gain Scan Results"));
gtk_window_set_type_hint (GTK_WINDOW (dlgResults), GDK_WINDOW_TYPE_HINT_DIALOG);
dialog_vbox2 = gtk_dialog_get_content_area (GTK_DIALOG (dlgResults));
gtk_widget_set_name (dialog_vbox2, "dialog_vbox2");
gtk_widget_show (dialog_vbox2);
scrolledwindow1 = gtk_scrolled_window_new (NULL, NULL);
gtk_widget_set_name (scrolledwindow1, "scrolledwindow1");
gtk_widget_show (scrolledwindow1);
gtk_box_pack_start (GTK_BOX (dialog_vbox2), scrolledwindow1, TRUE, TRUE, 0);
gtk_scrolled_window_set_policy (GTK_SCROLLED_WINDOW (scrolledwindow1), GTK_POLICY_NEVER, GTK_POLICY_AUTOMATIC);
gtk_scrolled_window_set_shadow_type (GTK_SCROLLED_WINDOW (scrolledwindow1), GTK_SHADOW_IN);
results_table = gtk_tree_view_new ();
gtk_widget_set_name (results_table, "results_table");
gtk_widget_show (results_table);
gtk_container_add (GTK_CONTAINER (scrolledwindow1), results_table);
gtk_widget_set_can_focus(results_table, FALSE);
gtk_tree_view_set_rules_hint (GTK_TREE_VIEW (results_table), TRUE);
gtk_tree_view_set_enable_search (GTK_TREE_VIEW (results_table), FALSE);
dialog_action_area2 = gtk_dialog_get_action_area (GTK_DIALOG (dlgResults));
gtk_widget_set_name (dialog_action_area2, "dialog_action_area2");
gtk_widget_show (dialog_action_area2);
gtk_button_box_set_layout (GTK_BUTTON_BOX (dialog_action_area2), GTK_BUTTONBOX_END);
btn_cancel_rg = gtk_button_new_from_stock ("gtk-cancel");
gtk_widget_set_name (btn_cancel_rg, "btn_cancel_rg");
gtk_widget_show (btn_cancel_rg);
gtk_dialog_add_action_widget (GTK_DIALOG (dlgResults), btn_cancel_rg, GTK_RESPONSE_CANCEL);
gtk_widget_set_can_default(btn_cancel_rg, TRUE);
btn_apply_rg = gtk_button_new_from_stock ("gtk-apply");
gtk_widget_set_name (btn_apply_rg, "btn_apply_rg");
gtk_widget_show (btn_apply_rg);
gtk_dialog_add_action_widget (GTK_DIALOG (dlgResults), btn_apply_rg, GTK_RESPONSE_APPLY);
gtk_widget_set_can_default(btn_apply_rg, TRUE);
g_signal_connect ((gpointer) btn_cancel_rg, "released",
G_CALLBACK (on_btn_cancel_rg_released),
NULL);
g_signal_connect ((gpointer) btn_apply_rg, "released",
G_CALLBACK (on_btn_apply_rg_released),
NULL);
/* Store pointers to all widgets, for use by lookup_widget(). */
GLADE_HOOKUP_OBJECT_NO_REF (dlgResults, dlgResults, "dlgResults");
GLADE_HOOKUP_OBJECT_NO_REF (dlgResults, dialog_vbox2, "dialog_vbox2");
GLADE_HOOKUP_OBJECT (dlgResults, scrolledwindow1, "scrolledwindow1");
GLADE_HOOKUP_OBJECT (dlgResults, results_table, "results_table");
GLADE_HOOKUP_OBJECT_NO_REF (dlgResults, dialog_action_area2, "dialog_action_area2");
GLADE_HOOKUP_OBJECT (dlgResults, btn_cancel_rg, "btn_cancel_rg");
GLADE_HOOKUP_OBJECT (dlgResults, btn_apply_rg, "btn_apply_rg");
return dlgResults;
}