diff options
author | Burt P <pburt0@gmail.com> | 2017-07-25 06:24:47 -0500 |
---|---|---|
committer | Leandro Pereira <leandro@hardinfo.org> | 2017-07-30 10:16:42 -0700 |
commit | 03184de73de4adf8fcba09b8eac6b8c0a3f06aab (patch) | |
tree | 934ffbe93bd846ac95a1c57f2fed8871ee3b6e47 /shell/callbacks.c | |
parent | 6f8cedca0671ab68514352c64579546547804475 (diff) |
GTK3 updates
* Use gtk_widget_get_window() instead of ->window
cmake:
* add option to build against gtk3 `-DHARDINFO_GTK3=1`
* combine hardinfo-shell static library and hardinfo
* disable guibench for gtk3
hardinfo/util.c:
* widget_set_cursor() gtk3 changes
* For now, the whole function tree_view_save_image() is disabled
for gtk3.
shell/shell.c:
* add gtk_notebook_set_page() compatibility macro if not defined
* shell_summary_add_item() fixes
* Disable RANGE_GET_VALUE() RANGE_SET_VALUE() macros for GTK3. This
is a nigtmare onion to try and peel.
shell/callbacks.c:
* gtk_about_dialog_set_name() -> gtk_about_dialog_set_program_name()
after GTK+2.12.
shell/loadgraph.c:
* builds, but not yet functioning under gtk3
Signed-off-by: Burt P <pburt0@gmail.com>
Diffstat (limited to 'shell/callbacks.c')
-rwxr-xr-x | shell/callbacks.c | 12 |
1 files changed, 11 insertions, 1 deletions
diff --git a/shell/callbacks.c b/shell/callbacks.c index ecf2beac..6599975b 100755 --- a/shell/callbacks.c +++ b/shell/callbacks.c @@ -161,7 +161,11 @@ void cb_about_module(GtkAction * action) gtk_window_set_transient_for(GTK_WINDOW(about), GTK_WINDOW(shell->window)); text = g_strdup_printf(_("%s Module"), sm->name); +#if GTK_CHECK_VERSION(2, 12, 0) + gtk_about_dialog_set_program_name(GTK_ABOUT_DIALOG(about), text); +#else gtk_about_dialog_set_name(GTK_ABOUT_DIALOG(about), text); +#endif g_free(text); gtk_about_dialog_set_version(GTK_ABOUT_DIALOG(about), @@ -225,7 +229,13 @@ void cb_about() about = gtk_about_dialog_new(); gtk_window_set_transient_for(GTK_WINDOW(about), GTK_WINDOW(shell->window)); + +#if GTK_CHECK_VERSION(2, 12, 0) + gtk_about_dialog_set_program_name(GTK_ABOUT_DIALOG(about), "HardInfo"); +#else gtk_about_dialog_set_name(GTK_ABOUT_DIALOG(about), "HardInfo"); +#endif + gtk_about_dialog_set_version(GTK_ABOUT_DIALOG(about), VERSION); gtk_about_dialog_set_copyright(GTK_ABOUT_DIALOG(about), "Copyright \302\251 2003-2016 " @@ -274,6 +284,6 @@ void cb_quit(void) do { gtk_main_quit(); } while (gtk_main_level() > 1); - + exit(0); } |