commit geany-plugins for openSUSE:Factory
Script 'mail_helper' called by obssrc Hello community, here is the log from the commit of package geany-plugins for openSUSE:Factory checked in at 2024-07-11 20:32:22 ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ Comparing /work/SRC/openSUSE:Factory/geany-plugins (Old) and /work/SRC/openSUSE:Factory/.geany-plugins.new.17339 (New) ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ Package is "geany-plugins" Thu Jul 11 20:32:22 2024 rev:36 rq:1186684 version:2.0 Changes: -------- --- /work/SRC/openSUSE:Factory/geany-plugins/geany-plugins.changes 2023-10-24 20:08:07.112003924 +0200 +++ /work/SRC/openSUSE:Factory/.geany-plugins.new.17339/geany-plugins.changes 2024-07-11 20:32:27.931301735 +0200 @@ -1,0 +2,10 @@ +Wed Jul 10 13:12:50 UTC 2024 - Bjørn Lie <bjorn.lie@gmail.com> + +- Add upstream patches: + + db2698cc869274aef353ba7af23d70921d944166.patch: + projectorganizer: fix invalid string comparison + + 644550babb52013d2625a3f8e789bbe94a335b6f.patch: + projectorganizer: Use g_pattern_spec_match_string() instead + of g_pattern_match_string() + +------------------------------------------------------------------- New: ---- 644550babb52013d2625a3f8e789bbe94a335b6f.patch db2698cc869274aef353ba7af23d70921d944166.patch BETA DEBUG BEGIN: New: projectorganizer: fix invalid string comparison + 644550babb52013d2625a3f8e789bbe94a335b6f.patch: projectorganizer: Use g_pattern_spec_match_string() instead New:- Add upstream patches: + db2698cc869274aef353ba7af23d70921d944166.patch: projectorganizer: fix invalid string comparison BETA DEBUG END: ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ Other differences: ------------------ ++++++ geany-plugins.spec ++++++ --- /var/tmp/diff_new_pack.1Ki727/_old 2024-07-11 20:32:28.419319568 +0200 +++ /var/tmp/diff_new_pack.1Ki727/_new 2024-07-11 20:32:28.419319568 +0200 @@ -1,7 +1,7 @@ # # spec file for package geany-plugins # -# Copyright (c) 2023 SUSE LLC +# Copyright (c) 2024 SUSE LLC # # All modifications and additions to the file contributed by third parties # remain the property of their copyright owners, unless otherwise agreed @@ -28,6 +28,10 @@ Group: Development/Tools/IDE URL: https://plugins.geany.org/geany-plugins/ Source: http://plugins.geany.org/geany-plugins/%{name}-%{version}.tar.bz2 +# PATCH-FIX-UPSTREAM db2698cc869274aef353ba7af23d70921d944166.patch -- projectorganizer: fix invalid string comparison +Patch1: https://github.com/geany/geany-plugins/commit/db2698cc869274aef353ba7af23d70... +# PATCH-FIX-UPSTREAM 644550babb52013d2625a3f8e789bbe94a335b6f.patch -- projectorganizer: Use g_pattern_spec_match_string() instead of g_pattern_match_string() +Patch2: https://github.com/geany/geany-plugins/commit/644550babb52013d2625a3f8e789bb... BuildRequires: devhelp-devel BuildRequires: fdupes ++++++ 644550babb52013d2625a3f8e789bbe94a335b6f.patch ++++++ From 05752c4c62dfbfa6f1038f2c280e02cbc6054f89 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Ji=C5=99=C3=AD=20Techet?= <techet@gmail.com> Date: Tue, 23 Apr 2024 18:43:51 +0200 Subject: [PATCH] projectorganizer: Use g_pattern_spec_match_string() instead of g_pattern_match_string() Eliminates a warning on newer glib versions. Adds a fallback on older versions. --- projectorganizer/src/prjorg-project.c | 2 +- projectorganizer/src/prjorg-sidebar.c | 4 ++-- projectorganizer/src/prjorg-utils.c | 4 ++-- projectorganizer/src/prjorg-utils.h | 4 ++++ 4 files changed, 9 insertions(+), 5 deletions(-) diff --git a/projectorganizer/src/prjorg-project.c b/projectorganizer/src/prjorg-project.c index 2161925bd..537c8a8cf 100644 --- a/projectorganizer/src/prjorg-project.c +++ b/projectorganizer/src/prjorg-project.c @@ -216,7 +216,7 @@ static gboolean match_basename(gconstpointer pft, gconstpointer user_data) { GPatternSpec *pattern = g_pattern_spec_new(ft->pattern[j]); - if (g_pattern_match_string(pattern, utf8_base_filename)) + if (g_pattern_spec_match_string(pattern, utf8_base_filename)) { ret = TRUE; g_pattern_spec_free(pattern); diff --git a/projectorganizer/src/prjorg-sidebar.c b/projectorganizer/src/prjorg-sidebar.c index 43b48fcbe..0a3e25eef 100644 --- a/projectorganizer/src/prjorg-sidebar.c +++ b/projectorganizer/src/prjorg-sidebar.c @@ -657,7 +657,7 @@ static void find_file_recursive(GtkTreeIter *iter, gboolean case_sensitive, gboo if (!case_sensitive) SETPTR(utf8_name, g_utf8_strdown(utf8_name, -1)); - if (g_pattern_match_string(pattern, utf8_name)) + if (g_pattern_spec_match_string(pattern, utf8_name)) { gchar *utf8_base_path = get_project_base_path(); gchar *utf8_path, *rel_path; @@ -840,7 +840,7 @@ static gboolean match(TMTag *tag, const gchar *name, gboolean declaration, gbool matches = g_strcmp0(name_case, name) == 0; break; case MATCH_PATTERN: - matches = g_pattern_match_string(pspec, name_case); + matches = g_pattern_spec_match_string(pspec, name_case); break; case MATCH_PREFIX: matches = g_str_has_prefix(name_case, name); diff --git a/projectorganizer/src/prjorg-utils.c b/projectorganizer/src/prjorg-utils.c index 2a8847e0d..0b573e5f8 100644 --- a/projectorganizer/src/prjorg-utils.c +++ b/projectorganizer/src/prjorg-utils.c @@ -80,7 +80,7 @@ gboolean patterns_match(GSList *patterns, const gchar *str) foreach_slist (elem, patterns) { GPatternSpec *pattern = elem->data; - if (g_pattern_match_string(pattern, str)) + if (g_pattern_spec_match_string(pattern, str)) return TRUE; } return FALSE; @@ -269,7 +269,7 @@ gchar *try_find_header_source(gchar *utf8_file_name, gboolean is_header, GSList full_name = elem->data; gchar *base_name = g_path_get_basename(full_name); - if (g_pattern_match_string(pattern, base_name)) + if (g_pattern_spec_match_string(pattern, base_name)) { if ((is_header && patterns_match(source_patterns, base_name)) || (!is_header && patterns_match(header_patterns, base_name))) diff --git a/projectorganizer/src/prjorg-utils.h b/projectorganizer/src/prjorg-utils.h index b753a84f0..25c0d28a6 100644 --- a/projectorganizer/src/prjorg-utils.h +++ b/projectorganizer/src/prjorg-utils.h @@ -22,6 +22,10 @@ #include <gtk/gtk.h> #include <geanyplugin.h> +#if ! GLIB_CHECK_VERSION(2, 70, 0) +# define g_pattern_spec_match_string g_pattern_match_string +#endif + gchar *get_relative_path(const gchar *utf8_parent, const gchar *utf8_descendant); gboolean patterns_match(GSList *patterns, const gchar *str); ++++++ db2698cc869274aef353ba7af23d70921d944166.patch ++++++ From 8d80688c9a8503b0ad8f464be0390691dfe2d47d Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Ji=C5=99=C3=AD=20Techet?= <techet@gmail.com> Date: Tue, 5 Mar 2024 18:36:37 +0100 Subject: [PATCH 1/4] projectorganizer: fix invalid string comparison --- projectorganizer/src/prjorg-sidebar.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/projectorganizer/src/prjorg-sidebar.c b/projectorganizer/src/prjorg-sidebar.c index b6422f09d..013947305 100644 --- a/projectorganizer/src/prjorg-sidebar.c +++ b/projectorganizer/src/prjorg-sidebar.c @@ -346,7 +346,7 @@ static gchar *get_fallback_dir_of_selection(void) { locale_path = g_path_get_dirname(doc->real_path); - if (locale_path && locale_path == '.') + if (locale_path && *locale_path == '.') { g_free(locale_path); locale_path = NULL; From ec96512db966857596068959f5e39fe82ce8910d Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Ji=C5=99=C3=AD=20Techet?= <techet@gmail.com> Date: Tue, 5 Mar 2024 18:37:16 +0100 Subject: [PATCH 2/4] projectorganizer: Add missing includes to header files Fixes warnings in clangd --- projectorganizer/src/prjorg-menu.h | 2 ++ projectorganizer/src/prjorg-project.h | 2 ++ projectorganizer/src/prjorg-sidebar.h | 1 + projectorganizer/src/prjorg-utils.h | 3 +++ 4 files changed, 8 insertions(+) diff --git a/projectorganizer/src/prjorg-menu.h b/projectorganizer/src/prjorg-menu.h index c5ae4a060..63f0c31f8 100644 --- a/projectorganizer/src/prjorg-menu.h +++ b/projectorganizer/src/prjorg-menu.h @@ -19,6 +19,8 @@ #ifndef __PRJORG_MENU_H__ #define __PRJORG_MENU_H__ +#include <glib.h> + void prjorg_menu_init(void); void prjorg_menu_activate_menu_items(gboolean activate); void prjorg_menu_cleanup(void); diff --git a/projectorganizer/src/prjorg-project.h b/projectorganizer/src/prjorg-project.h index 6b6f4a771..edc494d72 100644 --- a/projectorganizer/src/prjorg-project.h +++ b/projectorganizer/src/prjorg-project.h @@ -19,6 +19,8 @@ #ifndef __PRJORG_PROJECT_H__ #define __PRJORG_PROJECT_H__ +#include <gtk/gtk.h> + #define PRJORG_PATTERNS_SOURCE "*.c *.C *.cpp *.cxx *.c++ *.cc *.m" #define PRJORG_PATTERNS_HEADER "*.h *.H *.hpp *.hxx *.h++ *.hh" #define PRJORG_PATTERNS_IGNORED_DIRS ".* CVS" diff --git a/projectorganizer/src/prjorg-sidebar.h b/projectorganizer/src/prjorg-sidebar.h index e61ff9e70..e5a2fc91c 100644 --- a/projectorganizer/src/prjorg-sidebar.h +++ b/projectorganizer/src/prjorg-sidebar.h @@ -19,6 +19,7 @@ #ifndef __PRJORG_SIDEBAR_H__ #define __PRJORG_SIDEBAR_H__ +#include <gtk/gtk.h> void prjorg_sidebar_init(void); void prjorg_sidebar_cleanup(void); diff --git a/projectorganizer/src/prjorg-utils.h b/projectorganizer/src/prjorg-utils.h index c3719a92c..b753a84f0 100644 --- a/projectorganizer/src/prjorg-utils.h +++ b/projectorganizer/src/prjorg-utils.h @@ -19,6 +19,9 @@ #ifndef __PRJORG_UTILS_H__ #define __PRJORG_UTILS_H__ +#include <gtk/gtk.h> +#include <geanyplugin.h> + gchar *get_relative_path(const gchar *utf8_parent, const gchar *utf8_descendant); gboolean patterns_match(GSList *patterns, const gchar *str); From 07f0fdc1ef2ccaf104b5f9591bfcf3a56f035c4f Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Ji=C5=99=C3=AD=20Techet?= <techet@gmail.com> Date: Tue, 5 Mar 2024 18:40:10 +0100 Subject: [PATCH 3/4] projectorganizer: fix various warnings --- projectorganizer/src/prjorg-sidebar.c | 9 +++------ 1 file changed, 3 insertions(+), 6 deletions(-) diff --git a/projectorganizer/src/prjorg-sidebar.c b/projectorganizer/src/prjorg-sidebar.c index 013947305..e67cce2a5 100644 --- a/projectorganizer/src/prjorg-sidebar.c +++ b/projectorganizer/src/prjorg-sidebar.c @@ -382,7 +382,8 @@ void on_open_file_manager(G_GNUC_UNUSED GtkMenuItem * menuitem, G_GNUC_UNUSED gp if (locale_path) { - gchar *command, *open_command; + const gchar *open_command; + gchar *command; open_command = PRJORG_COMMAND_OPEN; command = g_strconcat (open_command, " \"", locale_path, "\"", NULL); @@ -1562,7 +1563,7 @@ gchar **prjorg_sidebar_get_expanded_paths(void) (GtkTreeViewMappingFunc)on_map_expanded, expanded_paths); g_ptr_array_add(expanded_paths, NULL); - return g_ptr_array_free(expanded_paths, FALSE); + return (gchar **)g_ptr_array_free(expanded_paths, FALSE); } @@ -1587,10 +1588,6 @@ void prjorg_sidebar_update_full(gboolean reload, gchar **expanded_paths) if (reload) { - GtkTreeSelection *treesel; - GtkTreeIter iter; - GtkTreeModel *model; - expand_data->expanded_paths = expanded_paths != NULL ? expanded_paths : prjorg_sidebar_get_expanded_paths(); expand_data->selected_path = get_selected_path(); From 00f0f07c40c72a024b7623197248ab6daca3242f Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Ji=C5=99=C3=AD=20Techet?= <techet@gmail.com> Date: Tue, 5 Mar 2024 22:42:46 +0100 Subject: [PATCH 4/4] projectorganizer: eliminate some depreciation warnings --- projectorganizer/src/prjorg-project.c | 77 +++++++++++++++++---------- projectorganizer/src/prjorg-sidebar.c | 39 +++++++------- 2 files changed, 68 insertions(+), 48 deletions(-) diff --git a/projectorganizer/src/prjorg-project.c b/projectorganizer/src/prjorg-project.c index 63c2a3a1b..2161925bd 100644 --- a/projectorganizer/src/prjorg-project.c +++ b/projectorganizer/src/prjorg-project.c @@ -655,23 +655,24 @@ void prjorg_project_read_properties_tab(void) GtkWidget *prjorg_project_add_properties_tab(GtkWidget *notebook) { - GtkWidget *vbox, *hbox, *hbox1; - GtkWidget *table; + GtkWidget *vbox, *hbox, *hbox1, *ebox, *table_box; GtkWidget *label; gchar *str; + GtkSizeGroup *size_group; e = g_new0(PropertyDialogElements, 1); - vbox = gtk_vbox_new(FALSE, 0); + vbox = gtk_box_new(GTK_ORIENTATION_VERTICAL, 0); - table = gtk_table_new(5, 2, FALSE); - gtk_table_set_row_spacings(GTK_TABLE(table), 6); - gtk_table_set_col_spacings(GTK_TABLE(table), 12); + table_box = gtk_box_new(GTK_ORIENTATION_VERTICAL, 12); + gtk_box_set_spacing(GTK_BOX(table_box), 6); + + size_group = gtk_size_group_new(GTK_SIZE_GROUP_HORIZONTAL); label = gtk_label_new(_("Source patterns:")); - gtk_misc_set_alignment(GTK_MISC(label), 0, 0); + gtk_label_set_xalign(GTK_LABEL(label), 0.0); + gtk_size_group_add_widget(size_group, label); e->source_patterns = gtk_entry_new(); - ui_table_add_row(GTK_TABLE(table), 0, label, e->source_patterns, NULL); ui_entry_add_clear_icon(GTK_ENTRY(e->source_patterns)); gtk_widget_set_tooltip_text(e->source_patterns, _("Space separated list of patterns that are used to identify source files. " @@ -679,59 +680,75 @@ GtkWidget *prjorg_project_add_properties_tab(GtkWidget *notebook) str = g_strjoinv(" ", prj_org->source_patterns); gtk_entry_set_text(GTK_ENTRY(e->source_patterns), str); g_free(str); + ebox = gtk_box_new(GTK_ORIENTATION_HORIZONTAL, 6); + gtk_box_pack_start(GTK_BOX(ebox), label, FALSE, FALSE, 0); + gtk_box_pack_start(GTK_BOX(ebox), e->source_patterns, TRUE, TRUE, 0); + gtk_box_pack_start(GTK_BOX(table_box), ebox, TRUE, FALSE, 0); label = gtk_label_new(_("Header patterns:")); - gtk_misc_set_alignment(GTK_MISC(label), 0, 0); + gtk_label_set_xalign(GTK_LABEL(label), 0.0); + gtk_size_group_add_widget(size_group, label); e->header_patterns = gtk_entry_new(); ui_entry_add_clear_icon(GTK_ENTRY(e->header_patterns)); - ui_table_add_row(GTK_TABLE(table), 1, label, e->header_patterns, NULL); gtk_widget_set_tooltip_text(e->header_patterns, _("Space separated list of patterns that are used to identify headers. " "Used for header/source swapping.")); str = g_strjoinv(" ", prj_org->header_patterns); gtk_entry_set_text(GTK_ENTRY(e->header_patterns), str); g_free(str); + ebox = gtk_box_new(GTK_ORIENTATION_HORIZONTAL, 6); + gtk_box_pack_start(GTK_BOX(ebox), label, FALSE, FALSE, 0); + gtk_box_pack_start(GTK_BOX(ebox), e->header_patterns, TRUE, TRUE, 0); + gtk_box_pack_start(GTK_BOX(table_box), ebox, TRUE, FALSE, 0); label = gtk_label_new(_("Ignored file patterns:")); - gtk_misc_set_alignment(GTK_MISC(label), 0, 0); + gtk_label_set_xalign(GTK_LABEL(label), 0.0); + gtk_size_group_add_widget(size_group, label); e->ignored_file_patterns = gtk_entry_new(); ui_entry_add_clear_icon(GTK_ENTRY(e->ignored_file_patterns)); - ui_table_add_row(GTK_TABLE(table), 2, label, e->ignored_file_patterns, NULL); gtk_widget_set_tooltip_text(e->ignored_file_patterns, _("Space separated list of patterns that are used to identify files " "that are not displayed in the project tree.")); str = g_strjoinv(" ", prj_org->ignored_file_patterns); gtk_entry_set_text(GTK_ENTRY(e->ignored_file_patterns), str); g_free(str); + ebox = gtk_box_new(GTK_ORIENTATION_HORIZONTAL, 6); + gtk_box_pack_start(GTK_BOX(ebox), label, FALSE, FALSE, 0); + gtk_box_pack_start(GTK_BOX(ebox), e->ignored_file_patterns, TRUE, TRUE, 0); + gtk_box_pack_start(GTK_BOX(table_box), ebox, TRUE, FALSE, 0); label = gtk_label_new(_("Ignored directory patterns:")); - gtk_misc_set_alignment(GTK_MISC(label), 0, 0); + gtk_label_set_xalign(GTK_LABEL(label), 0.0); + gtk_size_group_add_widget(size_group, label); e->ignored_dirs_patterns = gtk_entry_new(); ui_entry_add_clear_icon(GTK_ENTRY(e->ignored_dirs_patterns)); - ui_table_add_row(GTK_TABLE(table), 3, label, e->ignored_dirs_patterns, NULL); gtk_widget_set_tooltip_text(e->ignored_dirs_patterns, _("Space separated list of patterns that are used to identify directories " "that are not scanned for source files.")); str = g_strjoinv(" ", prj_org->ignored_dirs_patterns); gtk_entry_set_text(GTK_ENTRY(e->ignored_dirs_patterns), str); g_free(str); + ebox = gtk_box_new(GTK_ORIENTATION_HORIZONTAL, 6); + gtk_box_pack_start(GTK_BOX(ebox), label, FALSE, FALSE, 0); + gtk_box_pack_start(GTK_BOX(ebox), e->ignored_dirs_patterns, TRUE, TRUE, 0); + gtk_box_pack_start(GTK_BOX(table_box), ebox, TRUE, FALSE, 0); - gtk_box_pack_start(GTK_BOX(vbox), table, FALSE, FALSE, 6); + gtk_box_pack_start(GTK_BOX(vbox), table_box, FALSE, FALSE, 6); - hbox1 = gtk_hbox_new(FALSE, 0); + hbox1 = gtk_box_new(GTK_ORIENTATION_HORIZONTAL, 0); label = gtk_label_new(_("The patterns above affect only sidebar and indexing and are not used in the Find in Files\n" "dialog. You can further restrict the files belonging to the project by setting the\n" "File Patterns under the Project tab (these are also used for the Find in Files dialog).")); gtk_box_pack_start(GTK_BOX(hbox1), label, FALSE, FALSE, 12); gtk_box_pack_start(GTK_BOX(vbox), hbox1, FALSE, FALSE, 0); - hbox1 = gtk_hbox_new(FALSE, 0); + hbox1 = gtk_box_new(GTK_ORIENTATION_HORIZONTAL, 0); label = gtk_label_new(NULL); gtk_label_set_markup(GTK_LABEL(label), _("<b>Various</b>")); gtk_box_pack_start(GTK_BOX(hbox1), label, FALSE, FALSE, 0); gtk_box_pack_start(GTK_BOX(vbox), hbox1, FALSE, FALSE, 12); - hbox1 = gtk_hbox_new(FALSE, 0); + hbox1 = gtk_box_new(GTK_ORIENTATION_HORIZONTAL, 0); e->show_empty_dirs = gtk_check_button_new_with_label(_("Show empty directories in sidebar")); gtk_toggle_button_set_active(GTK_TOGGLE_BUTTON(e->show_empty_dirs), prj_org->show_empty_dirs); gtk_widget_set_tooltip_text(e->show_empty_dirs, @@ -741,12 +758,14 @@ GtkWidget *prjorg_project_add_properties_tab(GtkWidget *notebook) gtk_box_pack_start(GTK_BOX(hbox1), e->show_empty_dirs, FALSE, FALSE, 12); gtk_box_pack_start(GTK_BOX(vbox), hbox1, FALSE, FALSE, 0); - table = gtk_table_new(1, 2, FALSE); - gtk_table_set_row_spacings(GTK_TABLE(table), 6); - gtk_table_set_col_spacings(GTK_TABLE(table), 12); + table_box = gtk_box_new(GTK_ORIENTATION_VERTICAL, 12); + gtk_box_set_spacing(GTK_BOX(table_box), 6); + + size_group = gtk_size_group_new(GTK_SIZE_GROUP_HORIZONTAL); label = gtk_label_new(_("Index all project files:")); - gtk_misc_set_alignment(GTK_MISC(label), 0, 0); + gtk_label_set_xalign(GTK_LABEL(label), 0.0); + gtk_size_group_add_widget(size_group, label); e->generate_tag_prefs = gtk_combo_box_text_new(); gtk_combo_box_text_append_text(GTK_COMBO_BOX_TEXT(e->generate_tag_prefs), _("Auto (index if less than 1000 files)")); gtk_combo_box_text_append_text(GTK_COMBO_BOX_TEXT(e->generate_tag_prefs), _("Yes")); @@ -755,16 +774,18 @@ GtkWidget *prjorg_project_add_properties_tab(GtkWidget *notebook) gtk_widget_set_tooltip_text(e->generate_tag_prefs, _("Generate symbol list for all project files instead of only for the currently opened files. " "Might be slow for big projects.")); + ebox = gtk_box_new(GTK_ORIENTATION_HORIZONTAL, 6); + gtk_box_pack_start(GTK_BOX(ebox), label, FALSE, FALSE, 0); + gtk_box_pack_start(GTK_BOX(ebox), e->generate_tag_prefs, TRUE, TRUE, 0); + gtk_box_pack_start(GTK_BOX(table_box), ebox, TRUE, FALSE, 0); - ui_table_add_row(GTK_TABLE(table), 1, label, e->generate_tag_prefs, NULL); - - hbox1 = gtk_hbox_new(FALSE, 0); - gtk_box_pack_start(GTK_BOX(hbox1), table, FALSE, FALSE, 12); - gtk_box_pack_start(GTK_BOX(vbox), hbox1, FALSE, FALSE, 0); + hbox1 = gtk_box_new(GTK_ORIENTATION_HORIZONTAL, 0); + gtk_box_pack_start(GTK_BOX(hbox1), table_box, FALSE, FALSE, 12); + gtk_box_pack_start(GTK_BOX(vbox), hbox1, FALSE, FALSE, 6); label = gtk_label_new("Project Organizer"); - hbox = gtk_hbox_new(FALSE, 0); + hbox = gtk_box_new(GTK_ORIENTATION_HORIZONTAL, 0); gtk_box_pack_start(GTK_BOX(hbox), vbox, TRUE, TRUE, 6); gtk_notebook_append_page(GTK_NOTEBOOK(notebook), hbox, label); diff --git a/projectorganizer/src/prjorg-sidebar.c b/projectorganizer/src/prjorg-sidebar.c index e67cce2a5..43b48fcbe 100644 --- a/projectorganizer/src/prjorg-sidebar.c +++ b/projectorganizer/src/prjorg-sidebar.c @@ -138,7 +138,7 @@ static gint show_dialog_find_file(gchar *utf8_path, gchar **pattern, gboolean *c size_group = gtk_size_group_new(GTK_SIZE_GROUP_HORIZONTAL); label = gtk_label_new(_("Search for:")); - gtk_misc_set_alignment(GTK_MISC(label), 0, 0.5); + gtk_label_set_xalign(GTK_LABEL(label), 0.0); gtk_size_group_add_widget(size_group, label); s_fif_dialog.combo = gtk_combo_box_text_new_with_entry(); entry = gtk_bin_get_child(GTK_BIN(s_fif_dialog.combo)); @@ -147,29 +147,29 @@ static gint show_dialog_find_file(gchar *utf8_path, gchar **pattern, gboolean *c ui_entry_add_clear_icon(GTK_ENTRY(entry)); gtk_entry_set_activates_default(GTK_ENTRY(entry), TRUE); - ebox = gtk_hbox_new(FALSE, 6); + ebox = gtk_box_new(GTK_ORIENTATION_HORIZONTAL, 6); gtk_box_pack_start(GTK_BOX(ebox), label, FALSE, FALSE, 0); gtk_box_pack_start(GTK_BOX(ebox), s_fif_dialog.combo, TRUE, TRUE, 0); gtk_box_pack_start(GTK_BOX(vbox), ebox, TRUE, FALSE, 0); label = gtk_label_new(_("Search inside:")); - gtk_misc_set_alignment(GTK_MISC(label), 0, 0.5); + gtk_label_set_xalign(GTK_LABEL(label), 0.0); gtk_size_group_add_widget(size_group, label); s_fif_dialog.dir_label = gtk_label_new(""); - gtk_misc_set_alignment(GTK_MISC(s_fif_dialog.dir_label), 0, 0.5); + gtk_label_set_xalign(GTK_LABEL(s_fif_dialog.dir_label), 0.0); - ebox = gtk_hbox_new(FALSE, 6); + ebox = gtk_box_new(GTK_ORIENTATION_HORIZONTAL, 6); gtk_box_pack_start(GTK_BOX(ebox), label, FALSE, FALSE, 0); gtk_box_pack_start(GTK_BOX(ebox), s_fif_dialog.dir_label, TRUE, TRUE, 0); gtk_box_pack_start(GTK_BOX(vbox), ebox, TRUE, FALSE, 0); s_fif_dialog.case_sensitive = gtk_check_button_new_with_mnemonic(_("C_ase sensitive")); - gtk_button_set_focus_on_click(GTK_BUTTON(s_fif_dialog.case_sensitive), FALSE); + gtk_widget_set_focus_on_click(s_fif_dialog.case_sensitive, FALSE); s_fif_dialog.full_path = gtk_check_button_new_with_mnemonic(_("Search in full path")); - gtk_button_set_focus_on_click(GTK_BUTTON(s_fif_dialog.full_path), FALSE); + gtk_widget_set_focus_on_click(s_fif_dialog.full_path, FALSE); gtk_box_pack_start(GTK_BOX(vbox), s_fif_dialog.case_sensitive, TRUE, FALSE, 0); gtk_box_pack_start(GTK_BOX(vbox), s_fif_dialog.full_path, TRUE, FALSE, 0); @@ -727,7 +727,7 @@ static void create_dialog_find_tag(void) size_group = gtk_size_group_new(GTK_SIZE_GROUP_HORIZONTAL); label = gtk_label_new(_("Search for:")); - gtk_misc_set_alignment(GTK_MISC(label), 0, 0.5); + gtk_label_set_xalign(GTK_LABEL(label), 0.0); gtk_size_group_add_widget(size_group, label); s_ft_dialog.combo = gtk_combo_box_text_new_with_entry(); @@ -739,13 +739,13 @@ static void create_dialog_find_tag(void) ui_entry_add_clear_icon(GTK_ENTRY(entry)); gtk_entry_set_activates_default(GTK_ENTRY(entry), TRUE); - ebox = gtk_hbox_new(FALSE, 6); + ebox = gtk_box_new(GTK_ORIENTATION_HORIZONTAL, 6); gtk_box_pack_start(GTK_BOX(ebox), label, FALSE, FALSE, 0); gtk_box_pack_start(GTK_BOX(ebox), s_ft_dialog.combo, TRUE, TRUE, 0); gtk_box_pack_start(GTK_BOX(vbox), ebox, TRUE, FALSE, 0); label = gtk_label_new(_("Match type:")); - gtk_misc_set_alignment(GTK_MISC(label), 0, 0.5); + gtk_label_set_xalign(GTK_LABEL(label), 0.0); gtk_size_group_add_widget(size_group, label); s_ft_dialog.combo_match = gtk_combo_box_text_new(); @@ -755,28 +755,28 @@ static void create_dialog_find_tag(void) gtk_combo_box_set_active(GTK_COMBO_BOX(s_ft_dialog.combo_match), 1); gtk_label_set_mnemonic_widget(GTK_LABEL(label), s_ft_dialog.combo_match); - ebox = gtk_hbox_new(FALSE, 6); + ebox = gtk_box_new(GTK_ORIENTATION_HORIZONTAL, 6); gtk_box_pack_start(GTK_BOX(ebox), label, FALSE, FALSE, 0); gtk_box_pack_start(GTK_BOX(ebox), s_ft_dialog.combo_match, TRUE, TRUE, 0); gtk_box_pack_start(GTK_BOX(vbox), ebox, TRUE, FALSE, 0); label = gtk_label_new(_("Search inside:")); - gtk_misc_set_alignment(GTK_MISC(label), 0, 0.5); + gtk_label_set_xalign(GTK_LABEL(label), 0.0); gtk_size_group_add_widget(size_group, label); s_ft_dialog.dir_label = gtk_label_new(""); - gtk_misc_set_alignment(GTK_MISC(s_ft_dialog.dir_label), 0, 0.5); + gtk_label_set_xalign(GTK_LABEL(s_ft_dialog.dir_label), 0.0); - ebox = gtk_hbox_new(FALSE, 6); + ebox = gtk_box_new(GTK_ORIENTATION_HORIZONTAL, 6); gtk_box_pack_start(GTK_BOX(ebox), label, FALSE, FALSE, 0); gtk_box_pack_start(GTK_BOX(ebox), s_ft_dialog.dir_label, TRUE, TRUE, 0); gtk_box_pack_start(GTK_BOX(vbox), ebox, TRUE, FALSE, 0); s_ft_dialog.case_sensitive = gtk_check_button_new_with_mnemonic(_("C_ase sensitive")); - gtk_button_set_focus_on_click(GTK_BUTTON(s_ft_dialog.case_sensitive), FALSE); + gtk_widget_set_focus_on_click(s_ft_dialog.case_sensitive, FALSE); s_ft_dialog.declaration = gtk_check_button_new_with_mnemonic(_("_Declaration")); - gtk_button_set_focus_on_click(GTK_BUTTON(s_ft_dialog.declaration), FALSE); + gtk_widget_set_focus_on_click(s_ft_dialog.declaration, FALSE); g_object_unref(G_OBJECT(size_group)); /* auto destroy the size group */ @@ -1086,8 +1086,7 @@ static gboolean on_button_release(G_GNUC_UNUSED GtkWidget * widget, GdkEventButt gtk_widget_set_sensitive(s_popup_menu.delete, delete_enabled); - gtk_menu_popup(GTK_MENU(s_popup_menu.widget), NULL, NULL, NULL, NULL, - event->button, event->time); + gtk_menu_popup_at_pointer(GTK_MENU(s_popup_menu.widget), (GdkEvent *)event); return TRUE; } @@ -1208,7 +1207,7 @@ static void create_branch(gint level, GSList *leaf_list, GtkTreeIter *parent, icon = NULL; } else - gtk_icon_info_free(icon_info); + g_object_unref(icon_info); } g_free(content_type); } @@ -1655,7 +1654,7 @@ void prjorg_sidebar_init(void) PangoFontDescription *pfd; GList *focus_chain = NULL; - s_file_view_vbox = gtk_vbox_new(FALSE, 0); + s_file_view_vbox = gtk_box_new(GTK_ORIENTATION_VERTICAL, 0); /**** toolbar ****/
participants (1)
-
Source-Sync