Hi,

The commit here bumps the API and ABI and renames a signal. Just an FYI for any plugin developers, though a quick grep shows only the GProject plugin being affected in the Geany-Plugins project.

Cheers,
Matthew Brush

On 12-02-26 08:50 PM, Matthew Brush wrote:
Branch:      refs/heads/master
Author:      Matthew Brush<[email protected]>
Committer:   Matthew Brush<[email protected]>
Date:        Mon, 27 Feb 2012 04:50:01
Commit:      3d4e8b41d419255ee1b0764fb60e45ea588bd800
              
https://github.com/geany/geany/commit/3d4e8b41d419255ee1b0764fb60e45ea588bd800

Log Message:
-----------
Merge pull request #25 from techee/project_patches

Project patches


Modified Paths:
--------------
     doc/pluginsignals.c
     src/geanyobject.c
     src/geanyobject.h
     src/plugindata.h
     src/project.c

Modified: doc/pluginsignals.c
15 files changed, 12 insertions(+), 3 deletions(-)
===================================================================
@@ -156,18 +156,18 @@ static void on_document_open(GObject *obj, GeanyDocument 
*doc, gpointer user_dat
   */
  signal void (*project_close)(GObject *obj, gpointer user_data);

-/** Sent after a project dialog is created but before it is displayed. Plugins
+/** Sent after a project dialog is opened but before it is displayed. Plugins
   *  can append their own project settings tabs by using this signal.
   *  @param obj a GeanyObject instance, should be ignored.
   *  @param notebook a GtkNotebook instance that can be used by plugins to 
append their
   *  settings tabs.
   *  @param user_data user data.
   */
-signal void (*project_dialog_create)(GObject *obj, GtkWidget *notebook, 
gpointer user_data);
+signal void (*project_dialog_open)(GObject *obj, GtkWidget *notebook, gpointer 
user_data);

  /** Sent when the settings dialog is confirmed by the user. Plugins can use
   *  this signal to read the settings widgets previously added by using the
- *  @c project-dialog-create signal.
+ *  @c project-dialog-open signal.
   *  @warning The dialog will still be running afterwards if the user chose 
'Apply'.
   *  @param obj a GeanyObject instance, should be ignored.
   *  @param notebook a GtkNotebook instance that can be used by plugins to 
read their
@@ -176,6 +176,15 @@ static void on_document_open(GObject *obj, GeanyDocument 
*doc, gpointer user_dat
   */
  signal void (*project_dialog_confirmed)(GObject *obj, GtkWidget *notebook, 
gpointer user_data);

+/** Sent before project dialog is closed. By using this signal, plugins can 
remove
+ *  tabs previously added in project-dialog-open signal handler.
+ *  @param obj a GeanyObject instance, should be ignored.
+ *  @param notebook a GtkNotebook instance that can be used by plugins to 
remove
+ *  settings tabs previously added in the project-dialog-open signal handler.
+ *  @param user_data user data.
+ */
+signal void (*project_dialog_close)(GObject *obj, GtkWidget *notebook, 
gpointer user_data);
+
  /** Sent once Geany has finished all initialization and startup tasks and the 
GUI has been
   *  realized. This signal is the very last step in the startup process and is 
sent once
   *  the GTK main event loop has been entered.


Modified: src/geanyobject.c
15 files changed, 12 insertions(+), 3 deletions(-)
===================================================================
@@ -269,11 +269,11 @@ static void create_signals(GObjectClass *g_object_class)
                NULL, NULL,
                g_cclosure_marshal_VOID__VOID,
                G_TYPE_NONE, 0);
-       geany_object_signals[GCB_PROJECT_DIALOG_CREATE] = g_signal_new (
-               "project-dialog-create",
+       geany_object_signals[GCB_PROJECT_DIALOG_OPEN] = g_signal_new (
+               "project-dialog-open",
                G_OBJECT_CLASS_TYPE (g_object_class),
                G_SIGNAL_RUN_FIRST,
-               G_STRUCT_OFFSET (GeanyObjectClass, project_dialog_create),
+               G_STRUCT_OFFSET (GeanyObjectClass, project_dialog_open),
                NULL, NULL,
                g_cclosure_marshal_VOID__POINTER,
                G_TYPE_NONE, 1,
@@ -287,6 +287,15 @@ static void create_signals(GObjectClass *g_object_class)
                g_cclosure_marshal_VOID__POINTER,
                G_TYPE_NONE, 1,
                G_TYPE_POINTER);
+       geany_object_signals[GCB_PROJECT_DIALOG_CLOSE] = g_signal_new (
+               "project-dialog-close",
+               G_OBJECT_CLASS_TYPE (g_object_class),
+               G_SIGNAL_RUN_FIRST,
+               G_STRUCT_OFFSET (GeanyObjectClass, project_dialog_close),
+               NULL, NULL,
+               g_cclosure_marshal_VOID__POINTER,
+               G_TYPE_NONE, 1,
+               G_TYPE_POINTER);

        /* Editor signals */
        geany_object_signals[GCB_UPDATE_EDITOR_MENU] = g_signal_new (


Modified: src/geanyobject.h
6 files changed, 4 insertions(+), 2 deletions(-)
===================================================================
@@ -41,8 +41,9 @@
        GCB_PROJECT_OPEN,
        GCB_PROJECT_SAVE,
        GCB_PROJECT_CLOSE,
-       GCB_PROJECT_DIALOG_CREATE,
+       GCB_PROJECT_DIALOG_OPEN,
        GCB_PROJECT_DIALOG_CONFIRMED,
+       GCB_PROJECT_DIALOG_CLOSE,
        GCB_UPDATE_EDITOR_MENU,
        GCB_EDITOR_NOTIFY,
        GCB_GEANY_STARTUP_COMPLETE,
@@ -90,8 +91,9 @@ struct _GeanyObjectClass
        void (*project_open)(GKeyFile *keyfile);
        void (*project_save)(GKeyFile *keyfile);
        void (*project_close)(void);
-       void (*project_dialog_create)(GtkWidget *notebook);
+       void (*project_dialog_open)(GtkWidget *notebook);
        void (*project_dialog_confirmed)(GtkWidget *notebook);
+       void (*project_dialog_close)(GtkWidget *notebook);
        void (*update_editor_menu)(const gchar *word, gint click_pos, 
GeanyDocument *doc);
        gboolean (*editor_notify)(GeanyEditor *editor, gpointer scnt);
        void (*geany_startup_complete)(void);


Modified: src/plugindata.h
4 files changed, 2 insertions(+), 2 deletions(-)
===================================================================
@@ -53,14 +53,14 @@
   * @warning You should not test for values below 200 as previously
   * @c GEANY_API_VERSION was defined as an enum value, not a macro.
   */
-#define GEANY_API_VERSION 213
+#define GEANY_API_VERSION 214

  /** The Application Binary Interface (ABI) version, incremented whenever
   * existing fields in the plugin data types have to be changed or reordered.
   * Changing this forces all plugins to be recompiled before Geany can load 
them. */
  /* This should usually stay the same if fields are only appended, assuming 
only pointers to
   * structs and not structs themselves are declared by plugins. */
-#define GEANY_ABI_VERSION 68
+#define GEANY_ABI_VERSION 69


  /** Defines a function to check the plugin is safe to load.


Modified: src/project.c
5 files changed, 3 insertions(+), 2 deletions(-)
===================================================================
@@ -542,7 +542,7 @@ static void show_project_properties(gboolean show_build)
                g_free(str);
        }

-       g_signal_emit_by_name(geany_object, "project-dialog-create", 
e.notebook);
+       g_signal_emit_by_name(geany_object, "project-dialog-open", e.notebook);
        gtk_widget_show_all(e.dialog);

        /* note: notebook page must be shown before setting current page */
@@ -567,6 +567,7 @@ static void show_project_properties(gboolean show_build)
        }

        build_free_fields(e.build_properties);
+       g_signal_emit_by_name(geany_object, "project-dialog-close", e.notebook);
        gtk_notebook_remove_page(GTK_NOTEBOOK(e.notebook), e.build_page_num);
        gtk_widget_hide(e.dialog);
  }
@@ -593,7 +594,7 @@ gboolean project_ask_close(void)
        {
                if (dialogs_show_question_full(NULL, GTK_STOCK_CLOSE, 
GTK_STOCK_CANCEL,
                        _("Do you want to close it before proceeding?"),
-                       _("The '%s' project is already open."), 
app->project->name))
+                       _("The '%s' project is open."), app->project->name))
                {
                        project_close(FALSE);
                        return TRUE;



--------------
This E-Mail was brought to you by github_commit_mail.py (Source: TBD).
_______________________________________________
Geany-commits mailing list
[email protected]
https://lists.uvena.de/cgi-bin/mailman/listinfo/geany-commits

_______________________________________________
Geany-devel mailing list
[email protected]
https://lists.uvena.de/cgi-bin/mailman/listinfo/geany-devel

Reply via email to