[Geany-Devel] [PATCH geany-plugins 06/10] GeanyNumberedBookmarks: Fix GTK+3 support
Quentin Glidic
sardemff7+geany at xxxxx
Fri Apr 5 06:58:25 UTC 2013
From: Quentin Glidic <sardemff7+git at sardemff7.net>
Signed-off-by: Quentin Glidic <sardemff7+git at sardemff7.net>
---
build/geanynumberedbookmarks.m4 | 1 -
.../src/geanynumberedbookmarks.c | 28 +++++++++++-----------
2 files changed, 14 insertions(+), 15 deletions(-)
diff --git a/build/geanynumberedbookmarks.m4 b/build/geanynumberedbookmarks.m4
index 670bab9..d506ac4 100644
--- a/build/geanynumberedbookmarks.m4
+++ b/build/geanynumberedbookmarks.m4
@@ -1,7 +1,6 @@
AC_DEFUN([GP_CHECK_GEANYNUMBEREDBOOKMARKS],
[
GP_ARG_DISABLE([GeanyNumberedBookmarks], [auto])
- GP_CHECK_PLUGIN_GTK2_ONLY([GeanyNumberedBookmarks])
GP_COMMIT_PLUGIN_STATUS([GeanyNumberedBookmarks])
AC_CONFIG_FILES([
geanynumberedbookmarks/Makefile
diff --git a/geanynumberedbookmarks/src/geanynumberedbookmarks.c b/geanynumberedbookmarks/src/geanynumberedbookmarks.c
index 2a22ec1..8d1e42a 100644
--- a/geanynumberedbookmarks/src/geanynumberedbookmarks.c
+++ b/geanynumberedbookmarks/src/geanynumberedbookmarks.c
@@ -378,7 +378,7 @@ static gboolean SaveIndividualSetting(GKeyFile *gkf,FileData *fd,gint iNumber,gc
/* i==10 if no markers set */
/* skip if no folding data or markers */
- if(i==10 && (bRememberFolds==FALSE || fd->pcFolding==NULL) &&
+ if(i==10 && (bRememberFolds==FALSE || fd->pcFolding==NULL) &&
(bRememberBookmarks==FALSE || fd->pcBookmarks==NULL))
return FALSE;
@@ -863,7 +863,7 @@ static gint NextFreeMarker(ScintillaObject* sci)
l=scintilla_send_message(sci,SCI_MARKERSYMBOLDEFINED,m,0);
if(l==SC_MARK_CIRCLE || l==SC_MARK_AVAILABLE)
return m;
- }
+ }
/* no empty markers available so return -1 */
/* in theory shouldn't get here but leave just in case my logic is flawed */
@@ -1228,19 +1228,19 @@ GtkWidget *plugin_configure(GtkDialog *dialog)
/* save pointer to check_button */
g_object_set_data(G_OBJECT(dialog),"Geany_Numbered_Bookmarks_cb2",gtkw);
- gtkw=gtk_combo_box_new_text();
- gtk_combo_box_append_text((GtkComboBox*)gtkw,_("Move to start of line"));
- gtk_combo_box_append_text((GtkComboBox*)gtkw,_("Move to remembered position in line"));
- gtk_combo_box_append_text((GtkComboBox*)gtkw,_("Move to position in current line"));
- gtk_combo_box_append_text((GtkComboBox*)gtkw,_("Move to End of line"));
- gtk_combo_box_set_active((GtkComboBox*)gtkw,PositionInLine);
+ gtkw=gtk_combo_box_text_new();
+ gtk_combo_box_text_append_text(GTK_COMBO_BOX_TEXT(gtkw),_("Move to start of line"));
+ gtk_combo_box_text_append_text(GTK_COMBO_BOX_TEXT(gtkw),_("Move to remembered position in line"));
+ gtk_combo_box_text_append_text(GTK_COMBO_BOX_TEXT(gtkw),_("Move to position in current line"));
+ gtk_combo_box_text_append_text(GTK_COMBO_BOX_TEXT(gtkw),_("Move to End of line"));
+ gtk_combo_box_set_active(GTK_COMBO_BOX(gtkw),PositionInLine);
gtk_box_pack_start(GTK_BOX(vbox),gtkw,FALSE,FALSE,2);
g_object_set_data(G_OBJECT(dialog),"Geany_Numbered_Bookmarks_cb3",gtkw);
- gtkw=gtk_combo_box_new_text();
- gtk_combo_box_append_text((GtkComboBox*)gtkw,_("Save file settings with program settings"));
- gtk_combo_box_append_text((GtkComboBox*)gtkw,_("Save file settings to filename with suffix"));
- gtk_combo_box_set_active((GtkComboBox*)gtkw,WhereToSaveFileDetails);
+ gtkw=gtk_combo_box_text_new();
+ gtk_combo_box_text_append_text(GTK_COMBO_BOX_TEXT(gtkw),_("Save file settings with program settings"));
+ gtk_combo_box_text_append_text(GTK_COMBO_BOX_TEXT(gtkw),_("Save file settings to filename with suffix"));
+ gtk_combo_box_set_active(GTK_COMBO_BOX(gtkw),WhereToSaveFileDetails);
gtk_box_pack_start(GTK_BOX(vbox),gtkw,FALSE,FALSE,2);
g_object_set_data(G_OBJECT(dialog),"Geany_Numbered_Bookmarks_cb4",gtkw);
@@ -1288,7 +1288,7 @@ will move the bookmark there if it was set on a different line, or create it if
GTK_POLICY_AUTOMATIC);
gtk_scrolled_window_add_with_viewport((GtkScrolledWindow*)scroll,label);
- gtk_container_add(GTK_CONTAINER(GTK_DIALOG(dialog)->vbox),scroll);
+ gtk_container_add(GTK_CONTAINER(gtk_dialog_get_content_area(GTK_DIALOG(dialog))),scroll);
gtk_widget_show(scroll);
/* set dialog size (leave width default) */
@@ -1360,7 +1360,7 @@ static void GotoBookMark(gint iBookMark)
/* make sure view is not beyond start or end of document */
if(iLine+iLinesVisible>iLineCount)
iLine=iLineCount-iLinesVisible;
-
+
if(iLine<0)
iLine=0;
--
1.8.2
More information about the Devel
mailing list