Skip to content

Commit 1585be9

Browse files
authored
Merge branch 'geany:master' into master
2 parents 6af717d + d81942f commit 1585be9

File tree

14 files changed

+164
-132
lines changed

14 files changed

+164
-132
lines changed

NEWS

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,7 @@ Geany 2.0 (October 19, 2023)
77
* Split "session data" into session.conf, preferences are written to
88
and read from geany.conf (PR#2776, PR#2779, PR#3014, PR#3125 and more).
99
* Add new build system Meson (experimental) (PR#2761).
10-
* Require GTK 3.24 (#3580).
10+
* Require GTK 3.24 (PR#3580).
1111

1212
Bug fixes
1313
* (Re-)Add ability to scroll over document tabs (Luke Horwell, PR#3134).

autogen.sh

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,7 @@ test -z "$srcdir" && srcdir=.
88

99
DIE=0
1010

11-
(test -f $srcdir/configure.ac) || {
11+
(test -f "$srcdir/configure.ac") || {
1212
echo "**Error**: Directory "\`$srcdir\'" does not look like the top-level package directory"
1313
exit 1
1414
}
@@ -30,11 +30,11 @@ fi
3030

3131
echo "Processing configure.ac"
3232

33-
(cd $srcdir; autoreconf --install --verbose)
33+
(cd "$srcdir"; autoreconf --install --verbose)
3434

3535
if [ "$NOCONFIGURE" = 1 ]; then
3636
echo "Done. configure skipped."
3737
exit 0;
3838
fi
3939
echo "Running $srcdir/configure $@ ..."
40-
$srcdir/configure "$@" && echo "Now type 'make' to compile." || exit 1
40+
"$srcdir/configure" "$@" && echo "Now type 'make' to compile." || exit 1

plugins/filebrowser.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -317,7 +317,7 @@ static void refresh(void)
317317
GSList *list, *node;
318318

319319
/* don't clear when the new path doesn't exist */
320-
if (! g_file_test(current_dir, G_FILE_TEST_EXISTS))
320+
if (! current_dir || ! g_file_test(current_dir, G_FILE_TEST_EXISTS))
321321
return;
322322

323323
clear();

po/Makevars

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -12,7 +12,7 @@ subdir = po
1212
top_builddir = ..
1313

1414
# These options get passed to xgettext.
15-
XGETTEXT_OPTIONS = --keyword=_ --keyword=N_ --keyword=C_:1c,2 --keyword=NC_:1c,2
15+
XGETTEXT_OPTIONS = --keyword=_ --keyword=N_ --keyword=C_:1c,2 --keyword=NC_:1c,2 --keyword=g_dngettext:2,3 --from-code=UTF-8 -c"Translators:"
1616

1717
# This is the copyright holder that gets inserted into the header of the
1818
# $(DOMAIN).pot file. Set this to the copyright holder of the surrounding

src/about.c

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -330,6 +330,14 @@ static GtkWidget *create_dialog(void)
330330
ROW("", row, 0, 0, 0, 0);
331331
row++;
332332

333+
g_snprintf(buffer, sizeof(buffer), "Jiří Techet - %s", _("developer"));
334+
ROW(buffer, row, 0, 0, 0, 1);
335+
row++;
336+
ROW("<[email protected]>", row, 0, 0, 0, 1);
337+
row++;
338+
ROW("", row, 0, 0, 0, 0);
339+
row++;
340+
333341
g_snprintf(buffer, sizeof(buffer), "Matthew Brush - %s", _("developer"));
334342
ROW(buffer, row, 0, 0, 0, 1);
335343
row++;

src/document.c

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1235,7 +1235,7 @@ void document_apply_indent_settings(GeanyDocument *doc)
12351235
name = _("Tabs and Spaces");
12361236
break;
12371237
}
1238-
/* For translators: first wildcard is the indentation mode (Spaces, Tabs, Tabs
1238+
/* Translators: first wildcard is the indentation mode (Spaces, Tabs, Tabs
12391239
* and Spaces), the second one is the filename */
12401240
ui_set_statusbar(TRUE, _("Setting %s indentation mode for %s."), name,
12411241
DOC_FILENAME(doc));
@@ -1484,7 +1484,7 @@ GeanyDocument *document_open_file_full(GeanyDocument *doc, const gchar *filename
14841484
else
14851485
{
14861486
g_signal_emit_by_name(geany_object, "document-open", doc);
1487-
/* For translators: this is the status window message for opening a file. %d is the number
1487+
/* Translators: this is the status window message for opening a file. %d is the number
14881488
* of the newly opened file, %s indicates whether the file is opened read-only
14891489
* (it is replaced with the string ", read-only"). */
14901490
msgwin_status_add(_("File %s opened (%d%s)."),

src/geanyentryaction.c

Lines changed: 27 additions & 46 deletions
Original file line numberDiff line numberDiff line change
@@ -40,7 +40,6 @@ typedef struct _GeanyEntryActionPrivate GeanyEntryActionPrivate;
4040

4141
struct _GeanyEntryActionPrivate
4242
{
43-
GtkWidget *entry;
4443
gboolean numeric;
4544
};
4645

@@ -58,81 +57,64 @@ static guint signals[LAST_SIGNAL];
5857
G_DEFINE_TYPE(GeanyEntryAction, geany_entry_action, GTK_TYPE_ACTION)
5958

6059

61-
static GtkWidget *geany_entry_action_create_tool_item(GtkAction *action)
62-
{
63-
GtkWidget *toolitem;
64-
GeanyEntryActionPrivate *priv = GEANY_ENTRY_ACTION_GET_PRIVATE(action);
65-
66-
priv->entry = gtk_entry_new();
67-
if (priv->numeric)
68-
gtk_entry_set_width_chars(GTK_ENTRY(priv->entry), 9);
69-
70-
ui_entry_add_clear_icon(GTK_ENTRY(priv->entry));
71-
ui_entry_add_activate_backward_signal(GTK_ENTRY(priv->entry));
72-
73-
gtk_widget_show(priv->entry);
74-
75-
toolitem = g_object_new(GTK_TYPE_TOOL_ITEM, NULL);
76-
gtk_container_add(GTK_CONTAINER(toolitem), priv->entry);
77-
78-
return toolitem;
79-
}
80-
81-
8260
static void delegate_entry_activate_cb(GtkEntry *entry, GeanyEntryAction *action)
8361
{
84-
GeanyEntryActionPrivate *priv = GEANY_ENTRY_ACTION_GET_PRIVATE(action);
85-
const gchar *text = gtk_entry_get_text(GTK_ENTRY(priv->entry));
62+
const gchar *text = gtk_entry_get_text(entry);
8663

8764
g_signal_emit(action, signals[ENTRY_ACTIVATE], 0, text);
8865
}
8966

9067

9168
static void delegate_entry_activate_backward_cb(GtkEntry *entry, GeanyEntryAction *action)
9269
{
93-
GeanyEntryActionPrivate *priv = GEANY_ENTRY_ACTION_GET_PRIVATE(action);
94-
const gchar *text = gtk_entry_get_text(GTK_ENTRY(priv->entry));
70+
const gchar *text = gtk_entry_get_text(entry);
9571

9672
g_signal_emit(action, signals[ENTRY_ACTIVATE_BACKWARD], 0, text);
9773
}
9874

9975

10076
static void delegate_entry_changed_cb(GtkEditable *editable, GeanyEntryAction *action)
10177
{
102-
GeanyEntryActionPrivate *priv = GEANY_ENTRY_ACTION_GET_PRIVATE(action);
103-
const gchar *text = gtk_entry_get_text(GTK_ENTRY(priv->entry));
78+
const gchar *text = gtk_entry_get_text(GTK_ENTRY(editable));
10479

10580
g_signal_emit(action, signals[ENTRY_CHANGED], 0, text);
10681
}
10782

10883

109-
static void geany_entry_action_connect_proxy(GtkAction *action, GtkWidget *widget)
84+
static GtkWidget *geany_entry_action_create_tool_item(GtkAction *action)
11085
{
86+
GtkWidget *toolitem;
87+
GtkWidget *entry;
11188
GeanyEntryActionPrivate *priv = GEANY_ENTRY_ACTION_GET_PRIVATE(action);
11289

113-
/* make sure not to connect handlers twice */
114-
if (! g_object_get_data(G_OBJECT(widget), "gea-connected"))
115-
{
116-
if (priv->numeric)
117-
g_signal_connect(priv->entry, "insert-text",
118-
G_CALLBACK(ui_editable_insert_text_callback), NULL);
119-
g_signal_connect(priv->entry, "changed", G_CALLBACK(delegate_entry_changed_cb), action);
120-
g_signal_connect(priv->entry, "activate", G_CALLBACK(delegate_entry_activate_cb), action);
121-
g_signal_connect(priv->entry, "activate-backward",
122-
G_CALLBACK(delegate_entry_activate_backward_cb), action);
123-
124-
g_object_set_data(G_OBJECT(widget), "gea-connected", action /* anything non-NULL */);
125-
}
126-
127-
GTK_ACTION_CLASS(geany_entry_action_parent_class)->connect_proxy(action, widget);
90+
entry = gtk_entry_new();
91+
if (priv->numeric)
92+
gtk_entry_set_width_chars(GTK_ENTRY(entry), 9);
93+
94+
ui_entry_add_clear_icon(GTK_ENTRY(entry));
95+
ui_entry_add_activate_backward_signal(GTK_ENTRY(entry));
96+
97+
if (priv->numeric)
98+
g_signal_connect(entry, "insert-text",
99+
G_CALLBACK(ui_editable_insert_text_callback), NULL);
100+
g_signal_connect(entry, "changed", G_CALLBACK(delegate_entry_changed_cb), action);
101+
g_signal_connect(entry, "activate", G_CALLBACK(delegate_entry_activate_cb), action);
102+
g_signal_connect(entry, "activate-backward",
103+
G_CALLBACK(delegate_entry_activate_backward_cb), action);
104+
105+
gtk_widget_show(entry);
106+
107+
toolitem = g_object_new(GTK_TYPE_TOOL_ITEM, NULL);
108+
gtk_container_add(GTK_CONTAINER(toolitem), entry);
109+
110+
return toolitem;
128111
}
129112

130113

131114
static void geany_entry_action_class_init(GeanyEntryActionClass *klass)
132115
{
133116
GtkActionClass *action_class = GTK_ACTION_CLASS(klass);
134117

135-
action_class->connect_proxy = geany_entry_action_connect_proxy;
136118
action_class->create_tool_item = geany_entry_action_create_tool_item;
137119
action_class->toolbar_item_type = GTK_TYPE_MENU_TOOL_BUTTON;
138120

@@ -173,7 +155,6 @@ static void geany_entry_action_init(GeanyEntryAction *action)
173155
GEANY_ENTRY_ACTION_TYPE, GeanyEntryActionPrivate);
174156

175157
priv = action->priv;
176-
priv->entry = NULL;
177158
priv->numeric = FALSE;
178159
}
179160

src/libmain.c

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -599,7 +599,7 @@ static void parse_command_line_options(gint *argc, gchar ***argv)
599599
gchar *build_date = utils_parse_and_format_build_date(__DATE__);
600600

601601
printf(PACKAGE " %s (", main_get_version_string());
602-
/* note for translators: library versions are printed after this */
602+
/* Translators: library versions are printed after this */
603603
printf(_("built on %s with "), build_date);
604604
printf(geany_lib_versions,
605605
GTK_MAJOR_VERSION, GTK_MINOR_VERSION, GTK_MICRO_VERSION,
@@ -712,7 +712,7 @@ static gint create_config_dir(void)
712712
else
713713
{
714714
dialogs_show_msgbox(GTK_MESSAGE_WARNING,
715-
/* for translators: the third %s in brackets is the error message which
715+
/* Translators: the third %s in brackets is the error message which
716716
* describes why moving the dir didn't work */
717717
_("Your old configuration directory \"%s\" could not be moved to \"%s\" (%s). "
718718
"Please move manually the directory to the new location."),

src/project.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -96,7 +96,7 @@ static void destroy_project(gboolean open_default);
9696
#define SHOW_ERR(args) dialogs_show_msgbox(GTK_MESSAGE_ERROR, args)
9797
#define SHOW_ERR1(args, more) dialogs_show_msgbox(GTK_MESSAGE_ERROR, args, more)
9898
#define MAX_NAME_LEN 50
99-
/* "projects" is part of the default project base path so be careful when translating
99+
/* Translators: "projects" is part of the default project base path so be careful when translating
100100
* please avoid special characters and spaces, look at the source for details or ask Frank */
101101
#define PROJECT_DIR _("projects")
102102

0 commit comments

Comments
 (0)