Commit e647dd0d967d77b554d6d7857af34246dcb43cf7
1 parent
b9c4d07f
Exists in
master
and in
1 other branch
Fixing warnings
The definitions of the settings dialog are now private.
Showing
2 changed files
with
22 additions
and
18 deletions
Show diff stats
src/dialogs/settings/dialog.c
@@ -33,6 +33,17 @@ | @@ -33,6 +33,17 @@ | ||
33 | #include <terminal.h> | 33 | #include <terminal.h> |
34 | #include <lib3270/log.h> | 34 | #include <lib3270/log.h> |
35 | 35 | ||
36 | + struct _V3270SettingsDialog { | ||
37 | + GtkDialog parent; | ||
38 | + GtkNotebook * tabs; | ||
39 | + GtkWidget * terminal; | ||
40 | + gboolean has_subtitle; | ||
41 | + }; | ||
42 | + | ||
43 | + struct _V3270SettingsDialogClass { | ||
44 | + GtkDialogClass parent_class; | ||
45 | + }; | ||
46 | + | ||
36 | G_DEFINE_TYPE(V3270SettingsDialog, V3270SettingsDialog, GTK_TYPE_DIALOG); | 47 | G_DEFINE_TYPE(V3270SettingsDialog, V3270SettingsDialog, GTK_TYPE_DIALOG); |
37 | 48 | ||
38 | /*--[ Implement ]------------------------------------------------------------------------------------*/ | 49 | /*--[ Implement ]------------------------------------------------------------------------------------*/ |
@@ -50,7 +61,7 @@ static gboolean on_tab_focus(V3270Settings *settings, GdkEvent G_GNUC_UNUSED(*ev | @@ -50,7 +61,7 @@ static gboolean on_tab_focus(V3270Settings *settings, GdkEvent G_GNUC_UNUSED(*ev | ||
50 | } | 61 | } |
51 | */ | 62 | */ |
52 | 63 | ||
53 | -void on_switch_page(GtkNotebook *notebook, V3270Settings *settings, guint page_num, V3270SettingsDialog *dialog) | 64 | +void on_switch_page(GtkNotebook G_GNUC_UNUSED(*notebook), V3270Settings *settings, guint G_GNUC_UNUSED(page_num), V3270SettingsDialog *dialog) |
54 | { | 65 | { |
55 | debug("title: %s",settings->title); | 66 | debug("title: %s",settings->title); |
56 | debug("label: %s",settings->label); | 67 | debug("label: %s",settings->label); |
@@ -101,8 +112,6 @@ static void add(GtkContainer *container, GtkWidget *widget) | @@ -101,8 +112,6 @@ static void add(GtkContainer *container, GtkWidget *widget) | ||
101 | { | 112 | { |
102 | g_return_if_fail(GTK_IS_V3270_SETTINGS(widget)); | 113 | g_return_if_fail(GTK_IS_V3270_SETTINGS(widget)); |
103 | 114 | ||
104 | - debug("*************************** Added settings dialog %p",widget); | ||
105 | - | ||
106 | // https://developer.gnome.org/hig/stable/visual-layout.html.en | 115 | // https://developer.gnome.org/hig/stable/visual-layout.html.en |
107 | gtk_container_set_border_width(GTK_CONTAINER(widget),18); | 116 | gtk_container_set_border_width(GTK_CONTAINER(widget),18); |
108 | 117 | ||
@@ -221,7 +230,7 @@ static void V3270SettingsDialog_init(V3270SettingsDialog *dialog) | @@ -221,7 +230,7 @@ static void V3270SettingsDialog_init(V3270SettingsDialog *dialog) | ||
221 | 230 | ||
222 | gtk_notebook_set_scrollable(dialog->tabs,TRUE); | 231 | gtk_notebook_set_scrollable(dialog->tabs,TRUE); |
223 | gtk_notebook_set_show_tabs(dialog->tabs,FALSE); | 232 | gtk_notebook_set_show_tabs(dialog->tabs,FALSE); |
224 | - gtk_notebook_set_show_border(dialog->tabs, FALSE); | 233 | + // gtk_notebook_set_show_border(dialog->tabs, TRUE); |
225 | g_signal_connect(G_OBJECT(dialog->tabs), "page-added", G_CALLBACK(on_page_changed), dialog); | 234 | g_signal_connect(G_OBJECT(dialog->tabs), "page-added", G_CALLBACK(on_page_changed), dialog); |
226 | g_signal_connect(G_OBJECT(dialog->tabs), "page-removed", G_CALLBACK(on_page_changed), dialog); | 235 | g_signal_connect(G_OBJECT(dialog->tabs), "page-removed", G_CALLBACK(on_page_changed), dialog); |
227 | g_signal_connect(G_OBJECT(dialog->tabs), "switch-page", G_CALLBACK(on_switch_page), dialog); | 236 | g_signal_connect(G_OBJECT(dialog->tabs), "switch-page", G_CALLBACK(on_switch_page), dialog); |
src/include/v3270/settings.h
@@ -113,16 +113,8 @@ | @@ -113,16 +113,8 @@ | ||
113 | #define GTK_IS_V3270_SETTINGS_DIALOG_CLASS(klass) (G_TYPE_CHECK_CLASS_TYPE ((klass), GTK_TYPE_V3270_SETTINGS_DIALOG)) | 113 | #define GTK_IS_V3270_SETTINGS_DIALOG_CLASS(klass) (G_TYPE_CHECK_CLASS_TYPE ((klass), GTK_TYPE_V3270_SETTINGS_DIALOG)) |
114 | #define GTK_V3270_SETTINGS_DIALOG_GET_CLASS(obj) (G_TYPE_INSTANCE_GET_CLASS ((obj), GTK_TYPE_V3270_SETTINGS_DIALOG, V3270SettingsDialogClass)) | 114 | #define GTK_V3270_SETTINGS_DIALOG_GET_CLASS(obj) (G_TYPE_INSTANCE_GET_CLASS ((obj), GTK_TYPE_V3270_SETTINGS_DIALOG, V3270SettingsDialogClass)) |
115 | 115 | ||
116 | - typedef struct _V3270SettingsDialog { | ||
117 | - GtkDialog parent; | ||
118 | - GtkNotebook * tabs; | ||
119 | - GtkWidget * terminal; | ||
120 | - gboolean has_subtitle; | ||
121 | - } V3270SettingsDialog; | ||
122 | - | ||
123 | - typedef struct _V3270SettingsDialogClass { | ||
124 | - GtkDialogClass parent_class; | ||
125 | - } V3270SettingsDialogClass; | 116 | + typedef struct _V3270SettingsDialog V3270SettingsDialog; |
117 | + typedef struct _V3270SettingsDialogClass V3270SettingsDialogClass; | ||
126 | 118 | ||
127 | LIB3270_EXPORT GType V3270SettingsDialog_get_type(void); | 119 | LIB3270_EXPORT GType V3270SettingsDialog_get_type(void); |
128 | 120 | ||
@@ -136,15 +128,18 @@ | @@ -136,15 +128,18 @@ | ||
136 | LIB3270_EXPORT void v3270_settings_dialog_apply(GtkWidget *widget); | 128 | LIB3270_EXPORT void v3270_settings_dialog_apply(GtkWidget *widget); |
137 | LIB3270_EXPORT void v3270_settings_dialog_revert(GtkWidget *widget); | 129 | LIB3270_EXPORT void v3270_settings_dialog_revert(GtkWidget *widget); |
138 | 130 | ||
139 | - LIB3270_EXPORT GtkWidget * v3270_host_settings_new(); | ||
140 | - LIB3270_EXPORT GtkWidget * v3270_font_settings_new(); | ||
141 | - | ||
142 | LIB3270_EXPORT GtkWidget * v3270_font_chooser_widget_new() G_GNUC_DEPRECATED; | 131 | LIB3270_EXPORT GtkWidget * v3270_font_chooser_widget_new() G_GNUC_DEPRECATED; |
143 | LIB3270_EXPORT GtkWidget * v3270_host_select_new() G_GNUC_DEPRECATED; | 132 | LIB3270_EXPORT GtkWidget * v3270_host_select_new() G_GNUC_DEPRECATED; |
144 | 133 | ||
145 | - // Accelerator settings. | 134 | + /// @brief Create accelerator settings widget. |
146 | LIB3270_EXPORT GtkWidget * v3270_accelerator_settings_new(); | 135 | LIB3270_EXPORT GtkWidget * v3270_accelerator_settings_new(); |
147 | 136 | ||
137 | + /// @brief Create host settings widget. | ||
138 | + LIB3270_EXPORT GtkWidget * v3270_host_settings_new(); | ||
139 | + | ||
140 | + /// @brief Create font settings widget. | ||
141 | + LIB3270_EXPORT GtkWidget * v3270_font_settings_new(); | ||
142 | + | ||
148 | 143 | ||
149 | G_END_DECLS | 144 | G_END_DECLS |
150 | 145 |