/dev/tomkiewicz/new-smileys: 83486b5d34ab: Drop PidginSmiley, re...

Tomasz Wasilczyk twasilczyk at pidgin.im
Wed Apr 2 05:54:41 EDT 2014


Changeset: 83486b5d34ab093091634482fda2a85758fa9f97
Author:	 Tomasz Wasilczyk <twasilczyk at pidgin.im>
Date:	 2014-04-02 11:54 +0200
Branch:	 default
URL: https://hg.pidgin.im/dev/tomkiewicz/new-smileys/rev/83486b5d34ab

Description:

Drop PidginSmiley, rename gtksmiley to gtksmiley-manager

diffstat:

 pidgin/Makefile.am         |    4 +-
 pidgin/gtkblist.c          |    2 +-
 pidgin/gtksmiley.c         |   30 +++----------
 pidgin/gtksmiley.h         |  100 +-------------------------------------------
 pidgin/gtkwebviewtoolbar.c |    2 +-
 pidgin/libpidgin.c         |    3 -
 6 files changed, 14 insertions(+), 127 deletions(-)

diffs (284 lines):

diff --git a/pidgin/Makefile.am b/pidgin/Makefile.am
--- a/pidgin/Makefile.am
+++ b/pidgin/Makefile.am
@@ -75,8 +75,8 @@ libpidgin_la_SOURCES = \
 	gtksavedstatuses.c \
 	gtkscrollbook.c \
 	gtksession.c \
+	gtksmiley-manager.c \
 	gtksmiley-theme.c \
-	gtksmiley.c \
 	gtksound.c \
 	gtkstatus-icon-theme.c \
 	gtkstatusbox.c \
@@ -124,8 +124,8 @@ libpidgin_la_headers = \
 	gtksavedstatuses.h \
 	gtkscrollbook.h \
 	gtksession.h \
+	gtksmiley-manager.h \
 	gtksmiley-theme.h \
-	gtksmiley.h \
 	gtksound.h \
 	gtkstatus-icon-theme.h \
 	gtkstatusbox.h \
diff --git a/pidgin/gtkblist.c b/pidgin/gtkblist.c
--- a/pidgin/gtkblist.c
+++ b/pidgin/gtkblist.c
@@ -54,7 +54,7 @@
 #include "gtkroomlist.h"
 #include "gtkstatusbox.h"
 #include "gtkscrollbook.h"
-#include "gtksmiley.h"
+#include "gtksmiley-manager.h"
 #include "gtkblist-theme.h"
 #include "gtkblist-theme-loader.h"
 #include "gtkutils.h"
diff --git a/pidgin/gtksmiley.c b/pidgin/gtksmiley-manager.c
rename from pidgin/gtksmiley.c
rename to pidgin/gtksmiley-manager.c
--- a/pidgin/gtksmiley.c
+++ b/pidgin/gtksmiley-manager.c
@@ -17,7 +17,7 @@
  *
  * You should have received a copy of the GNU General Public License
  * along with this program; if not, write to the Free Software
- * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA  02111-1301  USA
+ * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02111-1301 USA
  */
 
 #include "internal.h"
@@ -28,7 +28,7 @@
 #include "notify.h"
 #include "smiley.h"
 
-#include "gtksmiley.h"
+#include "gtksmiley-manager.h"
 #include "gtkutils.h"
 #include "gtkwebview.h"
 #include "pidginstock.h"
@@ -37,6 +37,7 @@
 
 #define PIDGIN_RESPONSE_MODIFY 1000
 
+typedef struct _PidginSmiley PidginSmiley;
 struct _PidginSmiley
 {
 	PurpleSmiley *smiley;
@@ -82,23 +83,6 @@ pidgin_smiley_destroy(PidginSmiley *smil
 }
 
 /******************************************************************************
- * PidginWebViewSmileys stuff
- *****************************************************************************/
-
-void pidgin_smileys_init(void)
-{
-}
-
-void pidgin_smileys_uninit(void)
-{
-}
-
-GSList *pidgin_smileys_get_all(void)
-{
-	return NULL;
-}
-
-/******************************************************************************
  * Manager stuff
  *****************************************************************************/
 
@@ -270,7 +254,7 @@ smiley_name_delete_cb(GtkEditable *edita
 		gtk_dialog_set_response_sensitive(GTK_DIALOG(s->parent), GTK_RESPONSE_ACCEPT, FALSE);
 }
 
-PidginSmiley *
+static PidginSmiley *
 pidgin_smiley_edit(GtkWidget *widget, PurpleSmiley *smiley)
 {
 #if 0
@@ -411,13 +395,13 @@ pidgin_smiley_edit(GtkWidget *widget, Pu
 #endif
 }
 
-void
+static void
 pidgin_smiley_editor_set_shortcut(PidginSmiley *editor, const gchar *shortcut)
 {
 	gtk_entry_set_text(GTK_ENTRY(editor->smile), shortcut ? shortcut : "");
 }
 
-void
+static void
 pidgin_smiley_editor_set_image(PidginSmiley *editor, GdkPixbuf *image)
 {
 	if (editor->custom_pixbuf)
@@ -434,7 +418,7 @@ pidgin_smiley_editor_set_image(PidginSmi
 		                                  GTK_RESPONSE_ACCEPT, FALSE);
 }
 
-void
+static void
 pidgin_smiley_editor_set_data(PidginSmiley *editor, gpointer data, gsize datasize)
 {
 	editor->data = data;
diff --git a/pidgin/gtksmiley.h b/pidgin/gtksmiley-manager.h
rename from pidgin/gtksmiley.h
rename to pidgin/gtksmiley-manager.h
--- a/pidgin/gtksmiley.h
+++ b/pidgin/gtksmiley-manager.h
@@ -19,112 +19,18 @@
  * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA  02111-1301  USA
  */
 
-#ifndef PIDGIN_GTKSMILEY_H
-#define PIDGIN_GTKSMILEY_H
-/**
- * SECTION:gtksmiley
- * @section_id: pidgin-gtksmiley
- * @short_description: <filename>gtksmiley.h</filename>
- * @title: Custom Smiley API
- */
-
-#include "smiley.h"
-
-typedef struct _PidginSmiley PidginSmiley;
+#ifndef _PIDGIN_SMILEY_MANAGER_H_
+#define _PIDGIN_SMILEY_MANAGER_H_
 
 G_BEGIN_DECLS
 
 /**
- * pidgin_smiley_add_to_list:
- * @smiley:	The smiley to be added.
- *
- * Add a PurpleSmiley to the PidginWebViewSmiley's list to be able to use it
- * in pidgin
- */
-void pidgin_smiley_add_to_list(PurpleSmiley *smiley);
-
-/**
- * pidgin_smiley_del_from_list:
- * @smiley:	The smiley to be deleted.
- *
- * Delete a PurpleSmiley from the PidginWebViewSmiley's list
- */
-void pidgin_smiley_del_from_list(PurpleSmiley *smiley);
-
-/**
- * pidgin_smileys_init:
- *
- * Load the PidginWebViewSmiley list
- */
-void pidgin_smileys_init(void);
-
-/**
- * pidgin_smileys_uninit:
- *
- * Uninit the PidginWebViewSmiley list
- */
-void pidgin_smileys_uninit(void);
-
-/**
- * pidgin_smileys_get_all:
- *
- * Returns a GSList with the PidginWebViewSmiley of each custom smiley
- *
- * Returns: (transfer none): A PidginWebViewSmiley list
- */
-GSList *pidgin_smileys_get_all(void);
-
-/******************************************************************************
- * Smiley Manager
- *****************************************************************************/
-/**
  * pidgin_smiley_manager_show:
  *
  * Displays the Smiley Manager Window
  */
 void pidgin_smiley_manager_show(void);
 
-/**
- * pidgin_smiley_edit:
- * @widget: The parent widget to be linked or %NULL
- * @smiley: The PurpleSmiley to be edited, or %NULL for a new smiley
- *
- * Shows an editor for a smiley.
- *
- * See pidgin_smiley_editor_set_shortcut(), pidgin_smiley_editor_set_image().
- *
- * Returns: The smiley add dialog
- */
-PidginSmiley *pidgin_smiley_edit(GtkWidget *widget, PurpleSmiley *smiley);
-
-/**
- * pidgin_smiley_editor_set_shortcut:
- * @editor: A smiley editor dialog (created by pidgin_smiley_edit)
- * @shortcut: The shortcut to set
- *
- * Set the shortcut in a smiley add dialog
- */
-void pidgin_smiley_editor_set_shortcut(PidginSmiley *editor, const gchar *shortcut);
-
-/**
- * pidgin_smiley_editor_set_image:
- * @editor: A smiley editor dialog
- * @image: A GdkPixbuf image
- *
- * Set the image in a smiley add dialog
- */
-void pidgin_smiley_editor_set_image(PidginSmiley *editor, GdkPixbuf *image);
-
-/**
- * pidgin_smiley_editor_set_data:
- * @editor: A smiley editor dialog
- * @data: A pointer to smiley's data
- * @datasize: The size of smiley's data
- *
- * Sets the image data in a smiley add dialog
- */
-void pidgin_smiley_editor_set_data(PidginSmiley *editor, gpointer data, gsize datasize);
-
 G_END_DECLS
 
-#endif /* PIDGIN_GTKSMILEY_H */
+#endif /* _PIDGIN_SMILEY_MANAGER_H_ */
diff --git a/pidgin/gtkwebviewtoolbar.c b/pidgin/gtkwebviewtoolbar.c
--- a/pidgin/gtkwebviewtoolbar.c
+++ b/pidgin/gtkwebviewtoolbar.c
@@ -34,7 +34,7 @@
 
 #include "gtkdialogs.h"
 #include "gtkwebviewtoolbar.h"
-#include "gtksmiley.h"
+#include "gtksmiley-manager.h"
 #include "gtksmiley-theme.h"
 #include "gtkutils.h"
 
diff --git a/pidgin/libpidgin.c b/pidgin/libpidgin.c
--- a/pidgin/libpidgin.c
+++ b/pidgin/libpidgin.c
@@ -64,7 +64,6 @@
 #include "gtkroomlist.h"
 #include "gtksavedstatuses.h"
 #include "gtksession.h"
-#include "gtksmiley.h"
 #include "gtksmiley-theme.h"
 #include "gtksound.h"
 #include "gtkutils.h"
@@ -284,7 +283,6 @@ pidgin_ui_init(void)
 	pidgin_roomlist_init();
 	pidgin_log_init();
 	pidgin_docklet_init();
-	pidgin_smileys_init();
 	pidgin_smiley_theme_init();
 	pidgin_utils_init();
 	pidgin_medias_init();
@@ -305,7 +303,6 @@ pidgin_quit(void)
 	pidgin_utils_uninit();
 	pidgin_notify_uninit();
 	pidgin_smiley_theme_uninit();
-	pidgin_smileys_uninit();
 	pidgin_conversations_uninit();
 	pidgin_status_uninit();
 	pidgin_docklet_uninit();



More information about the Commits mailing list