[Goodies-commits] r7727 - in xfmpc/trunk: . src
Vincent Legout
vincent at xfce.org
Thu Jul 16 10:39:05 CEST 2009
Author: vincent
Date: 2009-07-16 08:39:05 +0000 (Thu, 16 Jul 2009)
New Revision: 7727
Modified:
xfmpc/trunk/ChangeLog
xfmpc/trunk/src/dbbrowser.c
xfmpc/trunk/src/extended-interface.c
xfmpc/trunk/src/interface.c
xfmpc/trunk/src/main-window.c
xfmpc/trunk/src/main.c
xfmpc/trunk/src/playlist.c
xfmpc/trunk/src/playlist.vala
xfmpc/trunk/src/preferences-dialog.c
xfmpc/trunk/src/preferences.c
xfmpc/trunk/src/song-dialog.c
xfmpc/trunk/src/statusbar.c
Log:
Fix compilation with vala 0.7.4
Modified: xfmpc/trunk/ChangeLog
===================================================================
--- xfmpc/trunk/ChangeLog 2009-07-16 05:50:18 UTC (rev 7726)
+++ xfmpc/trunk/ChangeLog 2009-07-16 08:39:05 UTC (rev 7727)
@@ -1,3 +1,7 @@
+2009-07-16 Vincent Legout <vincent at legout.info>
+
+Fix compilation with vala 0.7.4
+
2009-07-09 Mike Massonnet <mmassonnet at xfce.org>
Make the output of connection status on the terminal less verbose
Modified: xfmpc/trunk/src/dbbrowser.c
===================================================================
--- xfmpc/trunk/src/dbbrowser.c 2009-07-16 05:50:18 UTC (rev 7726)
+++ xfmpc/trunk/src/dbbrowser.c 2009-07-16 08:39:05 UTC (rev 7727)
@@ -23,6 +23,8 @@
#include <mpdclient.h>
#include <stdlib.h>
#include <string.h>
+#include <float.h>
+#include <math.h>
#include <gdk-pixbuf/gdk-pixdata.h>
#include <pango/pango.h>
#include <gdk/gdk.h>
@@ -96,6 +98,7 @@
} XfmpcDbbrowserColumns;
+static gpointer xfmpc_dbbrowser_parent_class = NULL;
GType xfmpc_dbbrowser_get_type (void);
GType xfmpc_preferences_get_type (void);
@@ -148,7 +151,6 @@
static void _xfmpc_dbbrowser_cb_search_entry_changed_gtk_editable_changed (GtkEditable* _sender, gpointer self);
static void _xfmpc_dbbrowser_reload_g_object_notify (GObject* _sender, GParamSpec* pspec, gpointer self);
static GObject * xfmpc_dbbrowser_constructor (GType type, guint n_construct_properties, GObjectConstructParam * construct_properties);
-static gpointer xfmpc_dbbrowser_parent_class = NULL;
static void xfmpc_dbbrowser_finalize (GObject* obj);
static int _vala_strcmp0 (const char * str1, const char * str2);
@@ -201,7 +203,10 @@
xfmpc_dbbrowser_append (self, filename, "..", TRUE, FALSE);
i++;
}
- while (xfmpc_mpdclient_database_read (self->priv->mpdclient, self->priv->wdir, &filename, &basename, &is_dir)) {
+ while (TRUE) {
+ if (!xfmpc_mpdclient_database_read (self->priv->mpdclient, self->priv->wdir, &filename, &basename, &is_dir)) {
+ break;
+ }
is_bold = xfmpc_playlist_has_filename (playlist, filename, is_dir);
xfmpc_dbbrowser_append (self, filename, basename, is_dir, is_bold);
if (g_utf8_collate (filename, self->priv->last_wdir) == 0) {
@@ -222,25 +227,28 @@
gboolean xfmpc_dbbrowser_wdir_is_root (XfmpcDbbrowser* self) {
+ gboolean result;
g_return_val_if_fail (self != NULL, FALSE);
- return _vala_strcmp0 (self->priv->wdir, "") == 0;
+ result = _vala_strcmp0 (self->priv->wdir, "") == 0;
+ return result;
}
char* xfmpc_dbbrowser_get_parent_wdir (XfmpcDbbrowser* self) {
+ char* result;
const char* _tmp0_;
char* filename;
g_return_val_if_fail (self != NULL, NULL);
_tmp0_ = NULL;
filename = (_tmp0_ = strstr (self->priv->wdir, "/"), (_tmp0_ == NULL) ? NULL : g_strdup (_tmp0_));
if (filename == NULL) {
- char* _tmp1_;
- _tmp1_ = NULL;
- return (_tmp1_ = g_strdup (""), filename = (g_free (filename), NULL), _tmp1_);
+ result = g_strdup ("");
+ filename = (g_free (filename), NULL);
+ return result;
} else {
- char* _tmp2_;
- _tmp2_ = NULL;
- return (_tmp2_ = g_path_get_dirname (self->priv->wdir), filename = (g_free (filename), NULL), _tmp2_);
+ result = g_path_get_dirname (self->priv->wdir);
+ filename = (g_free (filename), NULL);
+ return result;
}
filename = (g_free (filename), NULL);
}
@@ -366,7 +374,10 @@
}
self->priv->is_searching = TRUE;
xfmpc_dbbrowser_clear (self);
- while (xfmpc_mpdclient_database_search (self->priv->mpdclient, query, &filename, &basename)) {
+ while (TRUE) {
+ if (!xfmpc_mpdclient_database_search (self->priv->mpdclient, query, &filename, &basename)) {
+ break;
+ }
is_bold = xfmpc_playlist_has_filename (playlist, filename, FALSE);
xfmpc_dbbrowser_append (self, filename, basename, FALSE, is_bold);
i++;
@@ -479,18 +490,28 @@
(playlist == NULL) ? NULL : (playlist = (g_object_unref (playlist), NULL));
return;
}
- do {
- PangoWeight _tmp2_;
- gtk_tree_model_get (model, &iter, XFMPC_DBBROWSER_COLUMNS_COLUMN_FILENAME, &filename, XFMPC_DBBROWSER_COLUMNS_COLUMN_IS_DIR, &is_dir, -1, -1);
- is_bold = xfmpc_playlist_has_filename (playlist, filename, is_dir);
- _tmp2_ = 0;
- if (is_bold) {
- _tmp2_ = PANGO_WEIGHT_BOLD;
- } else {
- _tmp2_ = PANGO_WEIGHT_NORMAL;
+ {
+ gboolean _tmp2_;
+ _tmp2_ = TRUE;
+ while (TRUE) {
+ PangoWeight _tmp3_;
+ if (!_tmp2_) {
+ if (!gtk_tree_model_iter_next (model, &iter)) {
+ break;
+ }
+ }
+ _tmp2_ = FALSE;
+ gtk_tree_model_get (model, &iter, XFMPC_DBBROWSER_COLUMNS_COLUMN_FILENAME, &filename, XFMPC_DBBROWSER_COLUMNS_COLUMN_IS_DIR, &is_dir, -1, -1);
+ is_bold = xfmpc_playlist_has_filename (playlist, filename, is_dir);
+ _tmp3_ = 0;
+ if (is_bold) {
+ _tmp3_ = PANGO_WEIGHT_BOLD;
+ } else {
+ _tmp3_ = PANGO_WEIGHT_NORMAL;
+ }
+ gtk_list_store_set (self->priv->store, &iter, XFMPC_DBBROWSER_COLUMNS_COLUMN_WEIGHT, _tmp3_, -1, -1);
}
- gtk_list_store_set (self->priv->store, &iter, XFMPC_DBBROWSER_COLUMNS_COLUMN_WEIGHT, _tmp2_, -1, -1);
- } while (gtk_tree_model_iter_next (model, &iter));
+ }
(model == NULL) ? NULL : (model = (g_object_unref (model), NULL));
filename = (g_free (filename), NULL);
(playlist == NULL) ? NULL : (playlist = (g_object_unref (playlist), NULL));
@@ -498,29 +519,34 @@
static gboolean xfmpc_dbbrowser_cb_popup_menu (XfmpcDbbrowser* self) {
+ gboolean result;
g_return_val_if_fail (self != NULL, FALSE);
xfmpc_dbbrowser_menu_popup (self);
- return TRUE;
+ result = TRUE;
+ return result;
}
static gboolean xfmpc_dbbrowser_cb_key_pressed (XfmpcDbbrowser* self, const GdkEventKey* event) {
+ gboolean result;
g_return_val_if_fail (self != NULL, FALSE);
if ((*event).type != GDK_KEY_PRESS) {
- return FALSE;
+ result = FALSE;
+ return result;
}
switch ((*event).keyval) {
case 0xff0d:
{
- GtkTreeSelection* _tmp1_;
+ GtkTreeSelection* _tmp0_;
GtkTreeSelection* selection;
- _tmp1_ = NULL;
- selection = (_tmp1_ = gtk_tree_view_get_selection (self->priv->treeview), (_tmp1_ == NULL) ? NULL : g_object_ref (_tmp1_));
+ _tmp0_ = NULL;
+ selection = (_tmp0_ = gtk_tree_view_get_selection (self->priv->treeview), (_tmp0_ == NULL) ? NULL : g_object_ref (_tmp0_));
if (gtk_tree_selection_count_selected_rows (selection) > 1) {
xfmpc_dbbrowser_add_selected_rows (self);
} else {
- gboolean _tmp2_;
- return (_tmp2_ = FALSE, (selection == NULL) ? NULL : (selection = (g_object_unref (selection), NULL)), _tmp2_);
+ result = FALSE;
+ (selection == NULL) ? NULL : (selection = (g_object_unref (selection), NULL));
+ return result;
}
(selection == NULL) ? NULL : (selection = (g_object_unref (selection), NULL));
break;
@@ -536,22 +562,24 @@
}
default:
{
- return FALSE;
+ result = FALSE;
+ return result;
}
}
- return TRUE;
+ result = TRUE;
+ return result;
}
static gboolean xfmpc_dbbrowser_cb_button_released (XfmpcDbbrowser* self, const GdkEventButton* event) {
+ gboolean result;
gboolean _tmp0_;
GtkTreePath* path;
- GtkTreeSelection* _tmp2_;
+ GtkTreeSelection* _tmp1_;
GtkTreeSelection* selection;
- GtkTreePath* _tmp6_;
- gboolean _tmp5_;
GtkTreePath* _tmp4_;
- gboolean _tmp7_;
+ gboolean _tmp3_;
+ GtkTreePath* _tmp2_;
g_return_val_if_fail (self != NULL, FALSE);
_tmp0_ = FALSE;
if ((*event).type != GDK_BUTTON_PRESS) {
@@ -560,25 +588,31 @@
_tmp0_ = (*event).button != 3;
}
if (_tmp0_) {
- return FALSE;
+ result = FALSE;
+ return result;
}
path = NULL;
- _tmp2_ = NULL;
- selection = (_tmp2_ = gtk_tree_view_get_selection (self->priv->treeview), (_tmp2_ == NULL) ? NULL : g_object_ref (_tmp2_));
+ _tmp1_ = NULL;
+ selection = (_tmp1_ = gtk_tree_view_get_selection (self->priv->treeview), (_tmp1_ == NULL) ? NULL : g_object_ref (_tmp1_));
if (gtk_tree_selection_count_selected_rows (selection) < 1) {
- gboolean _tmp3_;
- return (_tmp3_ = TRUE, (path == NULL) ? NULL : (path = (gtk_tree_path_free (path), NULL)), (selection == NULL) ? NULL : (selection = (g_object_unref (selection), NULL)), _tmp3_);
+ result = TRUE;
+ (path == NULL) ? NULL : (path = (gtk_tree_path_free (path), NULL));
+ (selection == NULL) ? NULL : (selection = (g_object_unref (selection), NULL));
+ return result;
}
- _tmp6_ = NULL;
_tmp4_ = NULL;
- if ((_tmp5_ = gtk_tree_view_get_path_at_pos (self->priv->treeview, (gint) (*event).x, (gint) (*event).y, &_tmp4_, NULL, NULL, NULL), path = (_tmp6_ = _tmp4_, (path == NULL) ? NULL : (path = (gtk_tree_path_free (path), NULL)), _tmp6_), _tmp5_)) {
+ _tmp2_ = NULL;
+ if ((_tmp3_ = gtk_tree_view_get_path_at_pos (self->priv->treeview, (gint) (*event).x, (gint) (*event).y, &_tmp2_, NULL, NULL, NULL), path = (_tmp4_ = _tmp2_, (path == NULL) ? NULL : (path = (gtk_tree_path_free (path), NULL)), _tmp4_), _tmp3_)) {
if (!gtk_tree_selection_path_is_selected (selection, path)) {
gtk_tree_selection_unselect_all (selection);
gtk_tree_selection_select_path (selection, path);
}
}
xfmpc_dbbrowser_menu_popup (self);
- return (_tmp7_ = TRUE, (path == NULL) ? NULL : (path = (gtk_tree_path_free (path), NULL)), (selection == NULL) ? NULL : (selection = (g_object_unref (selection), NULL)), _tmp7_);
+ result = TRUE;
+ (path == NULL) ? NULL : (path = (gtk_tree_path_free (path), NULL));
+ (selection == NULL) ? NULL : (selection = (g_object_unref (selection), NULL));
+ return result;
}
@@ -695,15 +729,18 @@
static gboolean xfmpc_dbbrowser_cb_search_entry_key_released (XfmpcDbbrowser* self, const GdkEventKey* event) {
+ gboolean result;
g_return_val_if_fail (self != NULL, FALSE);
if ((*event).type != GDK_KEY_RELEASE) {
- return FALSE;
+ result = FALSE;
+ return result;
}
/* Escape */
if ((*event).keyval == 0xff1b) {
gtk_entry_set_text (self->priv->search_entry, "");
}
- return TRUE;
+ result = TRUE;
+ return result;
}
@@ -722,9 +759,11 @@
static gboolean xfmpc_dbbrowser_timeout_search (XfmpcDbbrowser* self) {
+ gboolean result;
g_return_val_if_fail (self != NULL, FALSE);
xfmpc_dbbrowser_cb_search_entry_activated (self);
- return FALSE;
+ result = FALSE;
+ return result;
}
Modified: xfmpc/trunk/src/extended-interface.c
===================================================================
--- xfmpc/trunk/src/extended-interface.c 2009-07-16 05:50:18 UTC (rev 7726)
+++ xfmpc/trunk/src/extended-interface.c 2009-07-16 08:39:05 UTC (rev 7727)
@@ -21,6 +21,7 @@
#include <glib-object.h>
#include <gtk/gtk.h>
#include <mpdclient.h>
+#include <xfce-arrow-button.h>
#include <stdlib.h>
#include <string.h>
#include <gdk/gdk.h>
@@ -28,7 +29,6 @@
#include <libxfcegui4/libxfcegui4.h>
#include <libxfce4util/libxfce4util.h>
#include <config.h>
-#include <xfce-arrow-button.h>
#define XFMPC_TYPE_EXTENDED_INTERFACE (xfmpc_extended_interface_get_type ())
@@ -116,6 +116,9 @@
} XfmpcExtendedInterfaceExtendedInterfaceWidget;
+static XfceArrowButton* xfmpc_extended_interface_context_button;
+static XfceArrowButton* xfmpc_extended_interface_context_button = NULL;
+static gpointer xfmpc_extended_interface_parent_class = NULL;
GType xfmpc_extended_interface_get_type (void);
GType xfmpc_preferences_get_type (void);
@@ -125,8 +128,6 @@
};
static GType xfmpc_extended_interface_columns_get_type (void);
GType xfmpc_extended_interface_extended_interface_widget_get_type (void);
-static XfceArrowButton* xfmpc_extended_interface_context_button;
-static XfceArrowButton* xfmpc_extended_interface_context_button = NULL;
void xfmpc_extended_interface_set_active (XfmpcExtendedInterface* self, XfmpcExtendedInterfaceExtendedInterfaceWidget active_widget);
static void xfmpc_extended_interface_append_child (XfmpcExtendedInterface* self, GtkWidget* child, const char* title);
static void xfmpc_extended_interface_context_menu_new (XfmpcExtendedInterface* self, GtkWidget* attach_widget);
@@ -166,7 +167,6 @@
XfmpcDbbrowser* xfmpc_dbbrowser_construct (GType object_type);
GType xfmpc_dbbrowser_get_type (void);
static GObject * xfmpc_extended_interface_constructor (GType type, guint n_construct_properties, GObjectConstructParam * construct_properties);
-static gpointer xfmpc_extended_interface_parent_class = NULL;
static void xfmpc_extended_interface_finalize (GObject* obj);
static void _vala_array_destroy (gpointer array, gint array_length, GDestroyNotify destroy_func);
static void _vala_array_free (gpointer array, gint array_length, GDestroyNotify destroy_func);
@@ -233,7 +233,7 @@
root_x = 0;
root_y = 0;
gtk_widget_size_request ((GtkWidget*) menu, &menu_req);
- gdk_window_get_origin (gtk_widget_get_window (GTK_WIDGET (xfmpc_extended_interface_context_button)), &root_x, &root_y);
+ gdk_window_get_origin (GTK_WIDGET (xfmpc_extended_interface_context_button)->window, &root_x, &root_y);
x = root_x + GTK_WIDGET (xfmpc_extended_interface_context_button)->allocation.x;
y = root_y + GTK_WIDGET (xfmpc_extended_interface_context_button)->allocation.y;
if (y > (gdk_screen_height () - menu_req.height)) {
Modified: xfmpc/trunk/src/interface.c
===================================================================
--- xfmpc/trunk/src/interface.c 2009-07-16 05:50:18 UTC (rev 7726)
+++ xfmpc/trunk/src/interface.c 2009-07-16 08:39:05 UTC (rev 7727)
@@ -74,6 +74,7 @@
};
+static gpointer xfmpc_interface_parent_class = NULL;
GType xfmpc_interface_get_type (void);
GType xfmpc_preferences_get_type (void);
@@ -114,7 +115,6 @@
static void _xfmpc_interface_cb_volume_changed_xfmpc_mpdclient_volume_changed (XfmpcMpdclient* _sender, gint volume, gpointer self);
static void _xfmpc_interface_cb_stopped_xfmpc_mpdclient_stopped (XfmpcMpdclient* _sender, gpointer self);
static GObject * xfmpc_interface_constructor (GType type, guint n_construct_properties, GObjectConstructParam * construct_properties);
-static gpointer xfmpc_interface_parent_class = NULL;
static void xfmpc_interface_finalize (GObject* obj);
@@ -158,6 +158,7 @@
static gboolean xfmpc_interface_cb_progress_box_release_event (XfmpcInterface* self, const GdkEventButton* event) {
+ gboolean result;
gboolean _tmp0_;
gint time_total;
double time;
@@ -169,16 +170,19 @@
_tmp0_ = (*event).button != 1;
}
if (_tmp0_) {
- return FALSE;
+ result = FALSE;
+ return result;
}
time_total = xfmpc_mpdclient_get_total_time (self->priv->mpdclient);
if (time_total < 0) {
- return FALSE;
+ result = FALSE;
+ return result;
}
time = (*event).x / ((GtkWidget*) self->priv->progress_bar)->allocation.width;
time = time * ((double) time_total);
xfmpc_mpdclient_set_song_time (self->priv->mpdclient, (guint) ((gint) time));
- return TRUE;
+ result = TRUE;
+ return result;
}
Modified: xfmpc/trunk/src/main-window.c
===================================================================
--- xfmpc/trunk/src/main-window.c 2009-07-16 05:50:18 UTC (rev 7726)
+++ xfmpc/trunk/src/main-window.c 2009-07-16 08:39:05 UTC (rev 7727)
@@ -100,6 +100,7 @@
};
+static gpointer xfmpc_main_window_parent_class = NULL;
GType xfmpc_main_window_get_type (void);
GType xfmpc_preferences_get_type (void);
@@ -164,7 +165,6 @@
static void _xfmpc_main_window_cb_show_statusbar_changed_g_object_notify (GObject* _sender, GParamSpec* pspec, gpointer self);
static gboolean _xfmpc_main_window_refresh_gsource_func (gpointer self);
static GObject * xfmpc_main_window_constructor (GType type, guint n_construct_properties, GObjectConstructParam * construct_properties);
-static gpointer xfmpc_main_window_parent_class = NULL;
static void xfmpc_main_window_finalize (GObject* obj);
static const GtkToggleActionEntry XFMPC_MAIN_WINDOW_toggle_action_entries[] = {{"view-statusbar", NULL, "", NULL, NULL, (GCallback) _xfmpc_main_window_action_statusbar_gtk_action_callback, FALSE}};
@@ -207,6 +207,7 @@
static gboolean xfmpc_main_window_refresh (XfmpcMainWindow* self) {
+ gboolean result;
g_return_val_if_fail (self != NULL, FALSE);
if (xfmpc_mpdclient_is_connected (self->priv->mpdclient)) {
xfmpc_mpdclient_update_status (self->priv->mpdclient);
@@ -219,29 +220,32 @@
xfmpc_interface_update_title (self->priv->interface);
}
}
- return TRUE;
+ result = TRUE;
+ return result;
}
static gboolean xfmpc_main_window_cb_window_state_event (XfmpcMainWindow* self, const GdkEventWindowState* event) {
- gboolean _tmp1_;
+ gboolean result;
+ gboolean _tmp0_;
g_return_val_if_fail (self != NULL, FALSE);
if ((*event).type != GDK_WINDOW_STATE) {
- return FALSE;
+ result = FALSE;
+ return result;
}
- _tmp1_ = FALSE;
+ _tmp0_ = FALSE;
if (((gboolean) (*event).changed_mask) & GDK_WINDOW_STATE_STICKY) {
- gboolean _tmp2_;
- _tmp1_ = (g_object_get ((GtkWidget*) self, "visible", &_tmp2_, NULL), _tmp2_);
+ gboolean _tmp1_;
+ _tmp0_ = (g_object_get ((GtkWidget*) self, "visible", &_tmp1_, NULL), _tmp1_);
} else {
- _tmp1_ = FALSE;
+ _tmp0_ = FALSE;
}
/**
* Hiding the top level window will unstick it too, and send a
* window-state-event signal, so here we take the value only if
* the window is visible
**/
- if (_tmp1_) {
+ if (_tmp0_) {
gboolean sticky;
sticky = FALSE;
if ((((gboolean) (*event).new_window_state) & GDK_WINDOW_STATE_STICKY) == FALSE) {
@@ -251,15 +255,18 @@
}
xfmpc_preferences_set_last_window_state_sticky (self->priv->preferences, sticky);
}
- return FALSE;
+ result = FALSE;
+ return result;
}
static gboolean xfmpc_main_window_cb_window_closed (XfmpcMainWindow* self, GdkEvent* event) {
+ gboolean result;
g_return_val_if_fail (self != NULL, FALSE);
g_return_val_if_fail (event != NULL, FALSE);
xfmpc_main_window_close_window (self);
- return FALSE;
+ result = FALSE;
+ return result;
}
Modified: xfmpc/trunk/src/main.c
===================================================================
--- xfmpc/trunk/src/main.c 2009-07-16 05:50:18 UTC (rev 7726)
+++ xfmpc/trunk/src/main.c 2009-07-16 08:39:05 UTC (rev 7727)
@@ -78,10 +78,13 @@
klass = (GEnumClass*) g_type_class_ref (G_VALUE_TYPE (&(*dst)));
i = 0;
enum_value = NULL;
- while ((enum_value = g_enum_get_value (klass, i)) != NULL) {
+ while (TRUE) {
char* _tmp1_;
char* _tmp0_;
gboolean _tmp2_;
+ if (!((enum_value = g_enum_get_value (klass, i)) != NULL)) {
+ break;
+ }
_tmp1_ = NULL;
_tmp0_ = NULL;
if ((_tmp2_ = strcmp (_tmp0_ = g_utf8_casefold (enum_value->value_name, -1), _tmp1_ = g_utf8_casefold (g_value_get_string (&(*src)), -1)) == 0, _tmp1_ = (g_free (_tmp1_), NULL), _tmp0_ = (g_free (_tmp0_), NULL), _tmp2_)) {
@@ -95,8 +98,8 @@
gint xfmpc_main (char** args, int args_length1) {
+ gint result;
XfmpcMainWindow* window;
- gint _tmp0_;
xfce_textdomain (GETTEXT_PACKAGE, PACKAGE_LOCALE_DIR, "UTF-8");
gtk_init (&args_length1, &args);
g_value_register_transform_func (G_TYPE_STRING, G_TYPE_INT, (GValueTransform) xfmpc_transform_string_to_int);
@@ -105,7 +108,9 @@
window = g_object_ref_sink (xfmpc_main_window_new ());
gtk_widget_show_all ((GtkWidget*) window);
gtk_main ();
- return (_tmp0_ = 0, (window == NULL) ? NULL : (window = (g_object_unref (window), NULL)), _tmp0_);
+ result = 0;
+ (window == NULL) ? NULL : (window = (g_object_unref (window), NULL));
+ return result;
}
Modified: xfmpc/trunk/src/playlist.c
===================================================================
--- xfmpc/trunk/src/playlist.c 2009-07-16 05:50:18 UTC (rev 7726)
+++ xfmpc/trunk/src/playlist.c 2009-07-16 08:39:05 UTC (rev 7727)
@@ -26,6 +26,8 @@
#include <libxfcegui4/libxfcegui4.h>
#include <gdk/gdk.h>
#include <pango/pango.h>
+#include <float.h>
+#include <math.h>
#include <glib/gi18n-lib.h>
@@ -122,6 +124,9 @@
} XfmpcExtendedInterfaceExtendedInterfaceWidget;
+static GtkEntry* xfmpc_playlist_filter_entry;
+static GtkEntry* xfmpc_playlist_filter_entry = NULL;
+static gpointer xfmpc_playlist_parent_class = NULL;
GType xfmpc_playlist_get_type (void);
GType xfmpc_preferences_get_type (void);
@@ -130,8 +135,6 @@
XFMPC_PLAYLIST_DUMMY_PROPERTY
};
static GType xfmpc_playlist_columns_get_type (void);
-static GtkEntry* xfmpc_playlist_filter_entry;
-static GtkEntry* xfmpc_playlist_filter_entry = NULL;
static gboolean xfmpc_playlist_visible_func_filter_tree (GtkTreeModel* model, GtkTreeIter* iter);
GType xfmpc_dbbrowser_get_type (void);
GType xfmpc_extended_interface_get_type (void);
@@ -179,7 +182,6 @@
static void _xfmpc_playlist_cb_filter_entry_changed_gtk_editable_changed (GtkEditable* _sender, gpointer self);
static void _xfmpc_playlist_cb_playlist_changed_g_object_notify (GObject* _sender, GParamSpec* pspec, gpointer self);
static GObject * xfmpc_playlist_constructor (GType type, guint n_construct_properties, GObjectConstructParam * construct_properties);
-static gpointer xfmpc_playlist_parent_class = NULL;
static void xfmpc_playlist_finalize (GObject* obj);
static int _vala_strcmp0 (const char * str1, const char * str2);
@@ -197,36 +199,41 @@
static gboolean xfmpc_playlist_visible_func_filter_tree (GtkTreeModel* model, GtkTreeIter* iter) {
+ gboolean result;
char* song;
char* search;
gboolean _result_;
+ char* _tmp1_;
+ const char* _tmp0_;
char* _tmp2_;
- const char* _tmp1_;
- char* _tmp3_;
- gboolean _tmp5_;
g_return_val_if_fail (model != NULL, FALSE);
song = g_strdup ("");
search = g_strdup ("");
_result_ = TRUE;
gtk_tree_model_get (model, &(*iter), XFMPC_PLAYLIST_COLUMNS_COLUMN_SONG, &song, -1, -1);
if (_vala_strcmp0 (song, "") == 0) {
- gboolean _tmp0_;
- return (_tmp0_ = TRUE, song = (g_free (song), NULL), search = (g_free (search), NULL), _tmp0_);
+ result = TRUE;
+ song = (g_free (song), NULL);
+ search = (g_free (search), NULL);
+ return result;
}
+ _tmp1_ = NULL;
+ _tmp0_ = NULL;
+ search = (_tmp1_ = (_tmp0_ = gtk_entry_get_text (xfmpc_playlist_filter_entry), (_tmp0_ == NULL) ? NULL : g_strdup (_tmp0_)), search = (g_free (search), NULL), _tmp1_);
_tmp2_ = NULL;
- _tmp1_ = NULL;
- search = (_tmp2_ = (_tmp1_ = gtk_entry_get_text (xfmpc_playlist_filter_entry), (_tmp1_ == NULL) ? NULL : g_strdup (_tmp1_)), search = (g_free (search), NULL), _tmp2_);
- _tmp3_ = NULL;
- search = (_tmp3_ = g_utf8_casefold (search, (glong) (-1)), search = (g_free (search), NULL), _tmp3_);
+ search = (_tmp2_ = g_utf8_casefold (search, (glong) (-1)), search = (g_free (search), NULL), _tmp2_);
if (_vala_strcmp0 (search, "") != 0) {
- char* _tmp4_;
- _tmp4_ = NULL;
- song = (_tmp4_ = g_utf8_casefold (song, (glong) (-1)), song = (g_free (song), NULL), _tmp4_);
+ char* _tmp3_;
+ _tmp3_ = NULL;
+ song = (_tmp3_ = g_utf8_casefold (song, (glong) (-1)), song = (g_free (song), NULL), _tmp3_);
if (strstr (song, search) == NULL) {
_result_ = FALSE;
}
}
- return (_tmp5_ = _result_, song = (g_free (song), NULL), search = (g_free (search), NULL), _tmp5_);
+ result = _result_;
+ song = (g_free (song), NULL);
+ search = (g_free (search), NULL);
+ return result;
}
@@ -244,10 +251,10 @@
XfmpcExtendedInterface* extended_interface;
GtkTreeSelection* _tmp0_;
GtkTreeSelection* selection;
- GtkListStore* _tmp1_;
- GtkListStore* model;
- GtkListStore* _tmp5_;
- GtkListStore* _tmp4_;
+ GtkTreeModel* _tmp1_;
+ GtkTreeModel* model;
+ GtkTreeModel* _tmp5_;
+ GtkTreeModel* _tmp4_;
GList* _tmp3_;
GtkTreeModel* _tmp2_;
GList* list;
@@ -266,12 +273,12 @@
return;
}
_tmp1_ = NULL;
- model = (_tmp1_ = self->priv->store, (_tmp1_ == NULL) ? NULL : g_object_ref (_tmp1_));
+ model = (_tmp1_ = (GtkTreeModel*) self->priv->store, (_tmp1_ == NULL) ? NULL : g_object_ref (_tmp1_));
_tmp5_ = NULL;
_tmp4_ = NULL;
_tmp3_ = NULL;
_tmp2_ = NULL;
- list = (_tmp3_ = gtk_tree_selection_get_selected_rows (selection, &_tmp2_), model = (_tmp4_ = (_tmp5_ = (GtkListStore*) _tmp2_, (_tmp5_ == NULL) ? NULL : g_object_ref (_tmp5_)), (model == NULL) ? NULL : (model = (g_object_unref (model), NULL)), _tmp4_), _tmp3_);
+ list = (_tmp3_ = gtk_tree_selection_get_selected_rows (selection, &_tmp2_), model = (_tmp4_ = (_tmp5_ = _tmp2_, (_tmp5_ == NULL) ? NULL : g_object_ref (_tmp5_)), (model == NULL) ? NULL : (model = (g_object_unref (model), NULL)), _tmp4_), _tmp3_);
if (g_list_length (list) == 0) {
(selection == NULL) ? NULL : (selection = (g_object_unref (selection), NULL));
(model == NULL) ? NULL : (model = (g_object_unref (model), NULL));
@@ -307,10 +314,10 @@
gint id;
GtkTreeSelection* _tmp0_;
GtkTreeSelection* selection;
- GtkListStore* _tmp1_;
- GtkListStore* model;
- GtkListStore* _tmp5_;
- GtkListStore* _tmp4_;
+ GtkTreeModel* _tmp1_;
+ GtkTreeModel* model;
+ GtkTreeModel* _tmp5_;
+ GtkTreeModel* _tmp4_;
GList* _tmp3_;
GtkTreeModel* _tmp2_;
GList* list;
@@ -325,12 +332,12 @@
return;
}
_tmp1_ = NULL;
- model = (_tmp1_ = self->priv->store, (_tmp1_ == NULL) ? NULL : g_object_ref (_tmp1_));
+ model = (_tmp1_ = (GtkTreeModel*) self->priv->store, (_tmp1_ == NULL) ? NULL : g_object_ref (_tmp1_));
_tmp5_ = NULL;
_tmp4_ = NULL;
_tmp3_ = NULL;
_tmp2_ = NULL;
- list = (_tmp3_ = gtk_tree_selection_get_selected_rows (selection, &_tmp2_), model = (_tmp4_ = (_tmp5_ = (GtkListStore*) _tmp2_, (_tmp5_ == NULL) ? NULL : g_object_ref (_tmp5_)), (model == NULL) ? NULL : (model = (g_object_unref (model), NULL)), _tmp4_), _tmp3_);
+ list = (_tmp3_ = gtk_tree_selection_get_selected_rows (selection, &_tmp2_), model = (_tmp4_ = (_tmp5_ = _tmp2_, (_tmp5_ == NULL) ? NULL : g_object_ref (_tmp5_)), (model == NULL) ? NULL : (model = (g_object_unref (model), NULL)), _tmp4_), _tmp3_);
if (g_list_length (list) == 0) {
(selection == NULL) ? NULL : (selection = (g_object_unref (selection), NULL));
(model == NULL) ? NULL : (model = (g_object_unref (model), NULL));
@@ -354,9 +361,11 @@
static gboolean xfmpc_playlist_cb_popup_menu (XfmpcPlaylist* self) {
+ gboolean result;
g_return_val_if_fail (self != NULL, FALSE);
xfmpc_playlist_menu_popup (self);
- return TRUE;
+ result = TRUE;
+ return result;
}
@@ -391,7 +400,10 @@
pos = 0;
self->priv->current = xfmpc_mpdclient_get_id (self->priv->mpdclient);
gtk_list_store_clear (self->priv->store);
- while (xfmpc_mpdclient_playlist_read (self->priv->mpdclient, &id, &pos, &filename, &song, &length)) {
+ while (TRUE) {
+ if (!xfmpc_mpdclient_playlist_read (self->priv->mpdclient, &id, &pos, &filename, &song, &length)) {
+ break;
+ }
xfmpc_playlist_append (self, id, pos, filename, song, length);
}
xfmpc_playlist_refresh_current_song (self);
@@ -432,9 +444,11 @@
static gboolean xfmpc_playlist_cb_key_released (XfmpcPlaylist* self, const GdkEventKey* event) {
+ gboolean result;
g_return_val_if_fail (self != NULL, FALSE);
if ((*event).type != GDK_KEY_RELEASE) {
- return FALSE;
+ result = FALSE;
+ return result;
}
/* Suppr key */
switch ((*event).keyval) {
@@ -445,24 +459,26 @@
}
default:
{
- return FALSE;
+ result = FALSE;
+ return result;
}
}
- return TRUE;
+ result = TRUE;
+ return result;
}
static gboolean xfmpc_playlist_cb_button_released (XfmpcPlaylist* self, const GdkEventButton* event) {
+ gboolean result;
GtkTreePath* path;
GtkTreeSelection* selection;
gboolean _tmp0_;
- GtkTreeSelection* _tmp3_;
GtkTreeSelection* _tmp2_;
+ GtkTreeSelection* _tmp1_;
gboolean sensitive;
- GtkTreePath* _tmp7_;
- gboolean _tmp6_;
GtkTreePath* _tmp5_;
- gboolean _tmp8_;
+ gboolean _tmp4_;
+ GtkTreePath* _tmp3_;
g_return_val_if_fail (self != NULL, FALSE);
path = NULL;
selection = NULL;
@@ -473,29 +489,36 @@
_tmp0_ = (*event).button != 3;
}
if (_tmp0_) {
- gboolean _tmp1_;
- return (_tmp1_ = FALSE, (path == NULL) ? NULL : (path = (gtk_tree_path_free (path), NULL)), (selection == NULL) ? NULL : (selection = (g_object_unref (selection), NULL)), _tmp1_);
+ result = FALSE;
+ (path == NULL) ? NULL : (path = (gtk_tree_path_free (path), NULL));
+ (selection == NULL) ? NULL : (selection = (g_object_unref (selection), NULL));
+ return result;
}
- _tmp3_ = NULL;
_tmp2_ = NULL;
- selection = (_tmp3_ = (_tmp2_ = gtk_tree_view_get_selection (self->priv->treeview), (_tmp2_ == NULL) ? NULL : g_object_ref (_tmp2_)), (selection == NULL) ? NULL : (selection = (g_object_unref (selection), NULL)), _tmp3_);
+ _tmp1_ = NULL;
+ selection = (_tmp2_ = (_tmp1_ = gtk_tree_view_get_selection (self->priv->treeview), (_tmp1_ == NULL) ? NULL : g_object_ref (_tmp1_)), (selection == NULL) ? NULL : (selection = (g_object_unref (selection), NULL)), _tmp2_);
if (gtk_tree_selection_count_selected_rows (selection) < 1) {
- gboolean _tmp4_;
- return (_tmp4_ = TRUE, (path == NULL) ? NULL : (path = (gtk_tree_path_free (path), NULL)), (selection == NULL) ? NULL : (selection = (g_object_unref (selection), NULL)), _tmp4_);
+ result = TRUE;
+ (path == NULL) ? NULL : (path = (gtk_tree_path_free (path), NULL));
+ (selection == NULL) ? NULL : (selection = (g_object_unref (selection), NULL));
+ return result;
}
sensitive = gtk_tree_selection_count_selected_rows (selection) == 1;
gtk_widget_set_sensitive ((GtkWidget*) self->priv->mi_browse, sensitive);
gtk_widget_set_sensitive ((GtkWidget*) self->priv->mi_information, sensitive);
- _tmp7_ = NULL;
_tmp5_ = NULL;
- if ((_tmp6_ = gtk_tree_view_get_path_at_pos (self->priv->treeview, (gint) (*event).x, (gint) (*event).y, &_tmp5_, NULL, NULL, NULL), path = (_tmp7_ = _tmp5_, (path == NULL) ? NULL : (path = (gtk_tree_path_free (path), NULL)), _tmp7_), _tmp6_)) {
+ _tmp3_ = NULL;
+ if ((_tmp4_ = gtk_tree_view_get_path_at_pos (self->priv->treeview, (gint) (*event).x, (gint) (*event).y, &_tmp3_, NULL, NULL, NULL), path = (_tmp5_ = _tmp3_, (path == NULL) ? NULL : (path = (gtk_tree_path_free (path), NULL)), _tmp5_), _tmp4_)) {
if (!gtk_tree_selection_path_is_selected (selection, path)) {
gtk_tree_selection_unselect_all (selection);
gtk_tree_selection_select_path (selection, path);
}
}
xfmpc_playlist_menu_popup (self);
- return (_tmp8_ = TRUE, (path == NULL) ? NULL : (path = (gtk_tree_path_free (path), NULL)), (selection == NULL) ? NULL : (selection = (g_object_unref (selection), NULL)), _tmp8_);
+ result = TRUE;
+ (path == NULL) ? NULL : (path = (gtk_tree_path_free (path), NULL));
+ (selection == NULL) ? NULL : (selection = (g_object_unref (selection), NULL));
+ return result;
}
@@ -506,36 +529,43 @@
static void xfmpc_playlist_cb_filter_entry_activated (XfmpcPlaylist* self) {
- GtkTreeModelFilter* _tmp3_;
- GtkTreeModelFilter* _tmp2_;
- GList* _tmp1_;
GtkTreeModel* _tmp0_;
+ GtkTreeModel* model;
+ GtkTreeModel* _tmp4_;
+ GtkTreeModel* _tmp3_;
+ GList* _tmp2_;
+ GtkTreeModel* _tmp1_;
GList* list;
- const GtkTreePath* _tmp4_;
+ const GtkTreePath* _tmp5_;
GtkTreePath* path;
g_return_if_fail (self != NULL);
+ _tmp0_ = NULL;
+ model = (_tmp0_ = (GtkTreeModel*) self->priv->filter, (_tmp0_ == NULL) ? NULL : g_object_ref (_tmp0_));
+ _tmp4_ = NULL;
_tmp3_ = NULL;
_tmp2_ = NULL;
_tmp1_ = NULL;
- _tmp0_ = NULL;
- list = (_tmp1_ = gtk_tree_selection_get_selected_rows (gtk_tree_view_get_selection (self->priv->treeview), &_tmp0_), self->priv->filter = (_tmp2_ = (_tmp3_ = (GtkTreeModelFilter*) _tmp0_, (_tmp3_ == NULL) ? NULL : g_object_ref (_tmp3_)), (self->priv->filter == NULL) ? NULL : (self->priv->filter = (g_object_unref (self->priv->filter), NULL)), _tmp2_), _tmp1_);
- _tmp4_ = NULL;
- path = (_tmp4_ = (const GtkTreePath*) g_list_nth_data (list, (guint) 0), (_tmp4_ == NULL) ? NULL : gtk_tree_path_copy (_tmp4_));
+ list = (_tmp2_ = gtk_tree_selection_get_selected_rows (gtk_tree_view_get_selection (self->priv->treeview), &_tmp1_), model = (_tmp3_ = (_tmp4_ = _tmp1_, (_tmp4_ == NULL) ? NULL : g_object_ref (_tmp4_)), (model == NULL) ? NULL : (model = (g_object_unref (model), NULL)), _tmp3_), _tmp2_);
+ _tmp5_ = NULL;
+ path = (_tmp5_ = (const GtkTreePath*) g_list_nth_data (list, (guint) 0), (_tmp5_ == NULL) ? NULL : gtk_tree_path_copy (_tmp5_));
if (g_list_length (list) > 0) {
gtk_tree_view_row_activated (self->priv->treeview, path, gtk_tree_view_get_column (self->priv->treeview, 0));
gtk_entry_set_text (xfmpc_playlist_filter_entry, "");
xfmpc_playlist_select_row (self, self->priv->current);
gtk_widget_grab_focus ((GtkWidget*) self->priv->treeview);
}
+ (model == NULL) ? NULL : (model = (g_object_unref (model), NULL));
(list == NULL) ? NULL : (list = (_g_list_free_gtk_tree_path_free (list), NULL));
(path == NULL) ? NULL : (path = (gtk_tree_path_free (path), NULL));
}
static gboolean xfmpc_playlist_cb_filter_entry_key_released (XfmpcPlaylist* self, const GdkEventKey* event) {
+ gboolean result;
g_return_val_if_fail (self != NULL, FALSE);
if ((*event).type != GDK_KEY_RELEASE) {
- return FALSE;
+ result = FALSE;
+ return result;
}
/* Escape */
if ((*event).keyval == 0xff1b) {
@@ -549,7 +579,8 @@
xfmpc_playlist_select_row (self, self->priv->current);
}
}
- return TRUE;
+ result = TRUE;
+ return result;
}
@@ -617,22 +648,22 @@
void xfmpc_playlist_delete_selection (XfmpcPlaylist* self) {
gint id;
GtkTreeIter iter = {0};
- GtkListStore* _tmp0_;
- GtkListStore* model;
- GtkListStore* _tmp4_;
- GtkListStore* _tmp3_;
+ GtkTreeModel* _tmp0_;
+ GtkTreeModel* model;
+ GtkTreeModel* _tmp4_;
+ GtkTreeModel* _tmp3_;
GList* _tmp2_;
GtkTreeModel* _tmp1_;
GList* list;
g_return_if_fail (self != NULL);
id = 0;
_tmp0_ = NULL;
- model = (_tmp0_ = self->priv->store, (_tmp0_ == NULL) ? NULL : g_object_ref (_tmp0_));
+ model = (_tmp0_ = (GtkTreeModel*) self->priv->store, (_tmp0_ == NULL) ? NULL : g_object_ref (_tmp0_));
_tmp4_ = NULL;
_tmp3_ = NULL;
_tmp2_ = NULL;
_tmp1_ = NULL;
- list = (_tmp2_ = gtk_tree_selection_get_selected_rows (gtk_tree_view_get_selection (self->priv->treeview), &_tmp1_), model = (_tmp3_ = (_tmp4_ = (GtkListStore*) _tmp1_, (_tmp4_ == NULL) ? NULL : g_object_ref (_tmp4_)), (model == NULL) ? NULL : (model = (g_object_unref (model), NULL)), _tmp3_), _tmp2_);
+ list = (_tmp2_ = gtk_tree_selection_get_selected_rows (gtk_tree_view_get_selection (self->priv->treeview), &_tmp1_), model = (_tmp3_ = (_tmp4_ = _tmp1_, (_tmp4_ == NULL) ? NULL : g_object_ref (_tmp4_)), (model == NULL) ? NULL : (model = (g_object_unref (model), NULL)), _tmp3_), _tmp2_);
{
GList* path_collection;
GList* path_it;
@@ -658,33 +689,43 @@
gboolean xfmpc_playlist_has_filename (XfmpcPlaylist* self, const char* filename, gboolean is_dir) {
+ gboolean result;
GtkTreeIter iter = {0};
GtkTreePath* path;
char* name;
GtkTreePath* _tmp0_;
- gboolean _tmp3_;
g_return_val_if_fail (self != NULL, FALSE);
g_return_val_if_fail (filename != NULL, FALSE);
path = NULL;
name = g_strdup ("");
_tmp0_ = NULL;
path = (_tmp0_ = gtk_tree_path_new_from_indices (0, -1, -1), (path == NULL) ? NULL : (path = (gtk_tree_path_free (path), NULL)), _tmp0_);
- while (gtk_tree_model_get_iter ((GtkTreeModel*) self->priv->store, &iter, path)) {
+ while (TRUE) {
+ if (!gtk_tree_model_get_iter ((GtkTreeModel*) self->priv->store, &iter, path)) {
+ break;
+ }
gtk_tree_model_get ((GtkTreeModel*) self->priv->store, &iter, XFMPC_PLAYLIST_COLUMNS_COLUMN_FILENAME, &name, -1, -1);
if (is_dir) {
if (g_str_has_prefix (name, filename)) {
- gboolean _tmp1_;
- return (_tmp1_ = TRUE, (path == NULL) ? NULL : (path = (gtk_tree_path_free (path), NULL)), name = (g_free (name), NULL), _tmp1_);
+ result = TRUE;
+ (path == NULL) ? NULL : (path = (gtk_tree_path_free (path), NULL));
+ name = (g_free (name), NULL);
+ return result;
}
} else {
if (_vala_strcmp0 (name, filename) == 0) {
- gboolean _tmp2_;
- return (_tmp2_ = TRUE, (path == NULL) ? NULL : (path = (gtk_tree_path_free (path), NULL)), name = (g_free (name), NULL), _tmp2_);
+ result = TRUE;
+ (path == NULL) ? NULL : (path = (gtk_tree_path_free (path), NULL));
+ name = (g_free (name), NULL);
+ return result;
}
}
gtk_tree_path_next (path);
}
- return (_tmp3_ = FALSE, (path == NULL) ? NULL : (path = (gtk_tree_path_free (path), NULL)), name = (g_free (name), NULL), _tmp3_);
+ result = FALSE;
+ (path == NULL) ? NULL : (path = (gtk_tree_path_free (path), NULL));
+ name = (g_free (name), NULL);
+ return result;
}
Modified: xfmpc/trunk/src/playlist.vala
===================================================================
--- xfmpc/trunk/src/playlist.vala 2009-07-16 05:50:18 UTC (rev 7726)
+++ xfmpc/trunk/src/playlist.vala 2009-07-16 08:39:05 UTC (rev 7727)
@@ -173,7 +173,7 @@
if (selection.count_selected_rows () > 1)
return;
- var model = this.store;
+ Gtk.TreeModel model = this.store;
var list = selection.get_selected_rows (out model);
if (list.length () == 0)
return;
@@ -198,7 +198,7 @@
if (selection.count_selected_rows () > 1)
return;
- var model = this.store;
+ Gtk.TreeModel model = this.store;
var list = selection.get_selected_rows (out model);
if (list.length () == 0)
return;
@@ -305,7 +305,8 @@
}
private void cb_filter_entry_activated () {
- var list = (this.treeview.get_selection ()).get_selected_rows (out filter);
+ Gtk.TreeModel model = filter;
+ var list = (this.treeview.get_selection ()).get_selected_rows (out model);
var path = list.nth_data (0);
if (list.length () > 0) {
@@ -390,7 +391,7 @@
public void delete_selection () {
int id = 0;
Gtk.TreeIter iter;
- var model = this.store;
+ Gtk.TreeModel model = this.store;
var list = (this.treeview.get_selection ()).get_selected_rows (out model);
Modified: xfmpc/trunk/src/preferences-dialog.c
===================================================================
--- xfmpc/trunk/src/preferences-dialog.c 2009-07-16 05:50:18 UTC (rev 7726)
+++ xfmpc/trunk/src/preferences-dialog.c 2009-07-16 08:39:05 UTC (rev 7727)
@@ -25,6 +25,8 @@
#include <stdlib.h>
#include <string.h>
#include <glib/gi18n-lib.h>
+#include <float.h>
+#include <math.h>
#include <pango/pango.h>
@@ -84,6 +86,7 @@
} XfmpcPreferencesSongFormat;
+static gpointer xfmpc_preferences_dialog_parent_class = NULL;
GType xfmpc_preferences_dialog_get_type (void);
GType xfmpc_preferences_get_type (void);
@@ -125,7 +128,6 @@
static void _xfmpc_preferences_dialog_cb_entry_custom_changed_gtk_editable_changed (GtkEditable* _sender, gpointer self);
static void _xfmpc_preferences_dialog_cb_response_gtk_dialog_response (GtkDialog* _sender, gint response_id, gpointer self);
static GObject * xfmpc_preferences_dialog_constructor (GType type, guint n_construct_properties, GObjectConstructParam * construct_properties);
-static gpointer xfmpc_preferences_dialog_parent_class = NULL;
static void xfmpc_preferences_dialog_finalize (GObject* obj);
@@ -235,14 +237,16 @@
static gboolean xfmpc_preferences_dialog_timeout_format (XfmpcPreferencesDialog* self) {
+ gboolean result;
const char* _tmp0_;
char* custom_format;
- gboolean _tmp1_;
g_return_val_if_fail (self != NULL, FALSE);
_tmp0_ = NULL;
custom_format = (_tmp0_ = gtk_entry_get_text (self->priv->entry_custom), (_tmp0_ == NULL) ? NULL : g_strdup (_tmp0_));
xfmpc_preferences_set_song_format_custom (self->priv->preferences, custom_format);
- return (_tmp1_ = FALSE, custom_format = (g_free (custom_format), NULL), _tmp1_);
+ result = FALSE;
+ custom_format = (g_free (custom_format), NULL);
+ return result;
}
Modified: xfmpc/trunk/src/preferences.c
===================================================================
--- xfmpc/trunk/src/preferences.c 2009-07-16 05:50:18 UTC (rev 7726)
+++ xfmpc/trunk/src/preferences.c 2009-07-16 08:39:05 UTC (rev 7727)
@@ -74,6 +74,9 @@
};
+static XfmpcPreferences* xfmpc_preferences_preferences;
+static XfmpcPreferences* xfmpc_preferences_preferences = NULL;
+static gpointer xfmpc_preferences_parent_class = NULL;
GType xfmpc_preferences_get_type (void);
GType xfmpc_preferences_song_format_get_type (void);
@@ -95,8 +98,6 @@
XFMPC_PREFERENCES_SONG_FORMAT,
XFMPC_PREFERENCES_SONG_FORMAT_CUSTOM
};
-static XfmpcPreferences* xfmpc_preferences_preferences;
-static XfmpcPreferences* xfmpc_preferences_preferences = NULL;
static void xfmpc_preferences_load (XfmpcPreferences* self);
XfmpcPreferences* xfmpc_preferences_new (void);
XfmpcPreferences* xfmpc_preferences_construct (GType object_type);
@@ -131,7 +132,6 @@
void xfmpc_preferences_set_song_format (XfmpcPreferences* self, XfmpcPreferencesSongFormat value);
const char* xfmpc_preferences_get_song_format_custom (XfmpcPreferences* self);
void xfmpc_preferences_set_song_format_custom (XfmpcPreferences* self, const char* value);
-static gpointer xfmpc_preferences_parent_class = NULL;
static void xfmpc_preferences_finalize (GObject* obj);
static void xfmpc_preferences_get_property (GObject * object, guint property_id, GValue * value, GParamSpec * pspec);
static void xfmpc_preferences_set_property (GObject * object, guint property_id, const GValue * value, GParamSpec * pspec);
@@ -186,6 +186,7 @@
XfmpcPreferences* xfmpc_preferences_get (void) {
+ XfmpcPreferences* result;
if (xfmpc_preferences_preferences == NULL) {
XfmpcPreferences* _tmp0_;
_tmp0_ = NULL;
@@ -193,7 +194,8 @@
} else {
g_object_ref ((GObject*) xfmpc_preferences_preferences);
}
- return xfmpc_preferences_preferences;
+ result = xfmpc_preferences_preferences;
+ return result;
}
@@ -305,8 +307,10 @@
gint xfmpc_preferences_get_last_window_posx (XfmpcPreferences* self) {
+ gint result;
g_return_val_if_fail (self != NULL, 0);
- return self->priv->_last_window_posx;
+ result = self->priv->_last_window_posx;
+ return result;
}
@@ -319,8 +323,10 @@
gint xfmpc_preferences_get_last_window_posy (XfmpcPreferences* self) {
+ gint result;
g_return_val_if_fail (self != NULL, 0);
- return self->priv->_last_window_posy;
+ result = self->priv->_last_window_posy;
+ return result;
}
@@ -333,8 +339,10 @@
gint xfmpc_preferences_get_last_window_width (XfmpcPreferences* self) {
+ gint result;
g_return_val_if_fail (self != NULL, 0);
- return self->priv->_last_window_width;
+ result = self->priv->_last_window_width;
+ return result;
}
@@ -347,8 +355,10 @@
gint xfmpc_preferences_get_last_window_height (XfmpcPreferences* self) {
+ gint result;
g_return_val_if_fail (self != NULL, 0);
- return self->priv->_last_window_height;
+ result = self->priv->_last_window_height;
+ return result;
}
@@ -361,8 +371,10 @@
gboolean xfmpc_preferences_get_last_window_state_sticky (XfmpcPreferences* self) {
+ gboolean result;
g_return_val_if_fail (self != NULL, FALSE);
- return self->priv->_last_window_state_sticky;
+ result = self->priv->_last_window_state_sticky;
+ return result;
}
@@ -375,8 +387,10 @@
gboolean xfmpc_preferences_get_playlist_autocenter (XfmpcPreferences* self) {
+ gboolean result;
g_return_val_if_fail (self != NULL, FALSE);
- return self->priv->_playlist_autocenter;
+ result = self->priv->_playlist_autocenter;
+ return result;
}
@@ -389,44 +403,50 @@
const char* xfmpc_preferences_get_dbbrowser_last_path (XfmpcPreferences* self) {
+ const char* result;
g_return_val_if_fail (self != NULL, NULL);
- return self->priv->_dbbrowser_last_path;
+ result = self->priv->_dbbrowser_last_path;
+ return result;
}
void xfmpc_preferences_set_dbbrowser_last_path (XfmpcPreferences* self, const char* value) {
- char* _tmp2_;
- const char* _tmp1_;
+ char* _tmp1_;
+ const char* _tmp0_;
g_return_if_fail (self != NULL);
- _tmp2_ = NULL;
_tmp1_ = NULL;
- self->priv->_dbbrowser_last_path = (_tmp2_ = (_tmp1_ = value, (_tmp1_ == NULL) ? NULL : g_strdup (_tmp1_)), self->priv->_dbbrowser_last_path = (g_free (self->priv->_dbbrowser_last_path), NULL), _tmp2_);
+ _tmp0_ = NULL;
+ self->priv->_dbbrowser_last_path = (_tmp1_ = (_tmp0_ = value, (_tmp0_ == NULL) ? NULL : g_strdup (_tmp0_)), self->priv->_dbbrowser_last_path = (g_free (self->priv->_dbbrowser_last_path), NULL), _tmp1_);
xfmpc_preferences_store (self);
g_object_notify ((GObject *) self, "dbbrowser-last-path");
}
const char* xfmpc_preferences_get_mpd_hostname (XfmpcPreferences* self) {
+ const char* result;
g_return_val_if_fail (self != NULL, NULL);
- return self->priv->_mpd_hostname;
+ result = self->priv->_mpd_hostname;
+ return result;
}
void xfmpc_preferences_set_mpd_hostname (XfmpcPreferences* self, const char* value) {
- char* _tmp2_;
- const char* _tmp1_;
+ char* _tmp1_;
+ const char* _tmp0_;
g_return_if_fail (self != NULL);
- _tmp2_ = NULL;
_tmp1_ = NULL;
- self->priv->_mpd_hostname = (_tmp2_ = (_tmp1_ = value, (_tmp1_ == NULL) ? NULL : g_strdup (_tmp1_)), self->priv->_mpd_hostname = (g_free (self->priv->_mpd_hostname), NULL), _tmp2_);
+ _tmp0_ = NULL;
+ self->priv->_mpd_hostname = (_tmp1_ = (_tmp0_ = value, (_tmp0_ == NULL) ? NULL : g_strdup (_tmp0_)), self->priv->_mpd_hostname = (g_free (self->priv->_mpd_hostname), NULL), _tmp1_);
xfmpc_preferences_store (self);
g_object_notify ((GObject *) self, "mpd-hostname");
}
gint xfmpc_preferences_get_mpd_port (XfmpcPreferences* self) {
+ gint result;
g_return_val_if_fail (self != NULL, 0);
- return self->priv->_mpd_port;
+ result = self->priv->_mpd_port;
+ return result;
}
@@ -439,26 +459,30 @@
const char* xfmpc_preferences_get_mpd_password (XfmpcPreferences* self) {
+ const char* result;
g_return_val_if_fail (self != NULL, NULL);
- return self->priv->_mpd_password;
+ result = self->priv->_mpd_password;
+ return result;
}
void xfmpc_preferences_set_mpd_password (XfmpcPreferences* self, const char* value) {
- char* _tmp2_;
- const char* _tmp1_;
+ char* _tmp1_;
+ const char* _tmp0_;
g_return_if_fail (self != NULL);
- _tmp2_ = NULL;
_tmp1_ = NULL;
- self->priv->_mpd_password = (_tmp2_ = (_tmp1_ = value, (_tmp1_ == NULL) ? NULL : g_strdup (_tmp1_)), self->priv->_mpd_password = (g_free (self->priv->_mpd_password), NULL), _tmp2_);
+ _tmp0_ = NULL;
+ self->priv->_mpd_password = (_tmp1_ = (_tmp0_ = value, (_tmp0_ == NULL) ? NULL : g_strdup (_tmp0_)), self->priv->_mpd_password = (g_free (self->priv->_mpd_password), NULL), _tmp1_);
xfmpc_preferences_store (self);
g_object_notify ((GObject *) self, "mpd-password");
}
gboolean xfmpc_preferences_get_mpd_use_defaults (XfmpcPreferences* self) {
+ gboolean result;
g_return_val_if_fail (self != NULL, FALSE);
- return self->priv->_mpd_use_defaults;
+ result = self->priv->_mpd_use_defaults;
+ return result;
}
@@ -471,8 +495,10 @@
gboolean xfmpc_preferences_get_show_statusbar (XfmpcPreferences* self) {
+ gboolean result;
g_return_val_if_fail (self != NULL, FALSE);
- return self->priv->_show_statusbar;
+ result = self->priv->_show_statusbar;
+ return result;
}
@@ -485,8 +511,10 @@
XfmpcPreferencesSongFormat xfmpc_preferences_get_song_format (XfmpcPreferences* self) {
+ XfmpcPreferencesSongFormat result;
g_return_val_if_fail (self != NULL, 0);
- return self->priv->_song_format;
+ result = self->priv->_song_format;
+ return result;
}
@@ -499,18 +527,20 @@
const char* xfmpc_preferences_get_song_format_custom (XfmpcPreferences* self) {
+ const char* result;
g_return_val_if_fail (self != NULL, NULL);
- return self->priv->_song_format_custom;
+ result = self->priv->_song_format_custom;
+ return result;
}
void xfmpc_preferences_set_song_format_custom (XfmpcPreferences* self, const char* value) {
- char* _tmp2_;
- const char* _tmp1_;
+ char* _tmp1_;
+ const char* _tmp0_;
g_return_if_fail (self != NULL);
- _tmp2_ = NULL;
_tmp1_ = NULL;
- self->priv->_song_format_custom = (_tmp2_ = (_tmp1_ = value, (_tmp1_ == NULL) ? NULL : g_strdup (_tmp1_)), self->priv->_song_format_custom = (g_free (self->priv->_song_format_custom), NULL), _tmp2_);
+ _tmp0_ = NULL;
+ self->priv->_song_format_custom = (_tmp1_ = (_tmp0_ = value, (_tmp0_ == NULL) ? NULL : g_strdup (_tmp0_)), self->priv->_song_format_custom = (g_free (self->priv->_song_format_custom), NULL), _tmp1_);
xfmpc_preferences_store (self);
g_object_notify ((GObject *) self, "song-format-custom");
}
Modified: xfmpc/trunk/src/song-dialog.c
===================================================================
--- xfmpc/trunk/src/song-dialog.c 2009-07-16 05:50:18 UTC (rev 7726)
+++ xfmpc/trunk/src/song-dialog.c 2009-07-16 08:39:05 UTC (rev 7727)
@@ -52,6 +52,7 @@
};
+static gpointer xfmpc_song_dialog_parent_class = NULL;
GType xfmpc_song_dialog_get_type (void);
#define XFMPC_SONG_DIALOG_GET_PRIVATE(o) (G_TYPE_INSTANCE_GET_PRIVATE ((o), XFMPC_TYPE_SONG_DIALOG, XfmpcSongDialogPrivate))
@@ -63,7 +64,6 @@
XfmpcSongDialog* xfmpc_song_dialog_new (gint song_id);
XfmpcSongDialog* xfmpc_song_dialog_construct (GType object_type, gint song_id);
XfmpcSongDialog* xfmpc_song_dialog_new (gint song_id);
-static gpointer xfmpc_song_dialog_parent_class = NULL;
static void xfmpc_song_dialog_finalize (GObject* obj);
Modified: xfmpc/trunk/src/statusbar.c
===================================================================
--- xfmpc/trunk/src/statusbar.c 2009-07-16 05:50:18 UTC (rev 7726)
+++ xfmpc/trunk/src/statusbar.c 2009-07-16 08:39:05 UTC (rev 7727)
@@ -50,6 +50,7 @@
};
+static gpointer xfmpc_statusbar_parent_class = NULL;
GType xfmpc_statusbar_get_type (void);
#define XFMPC_STATUSBAR_GET_PRIVATE(o) (G_TYPE_INSTANCE_GET_PRIVATE ((o), XFMPC_TYPE_STATUSBAR, XfmpcStatusbarPrivate))
@@ -62,7 +63,6 @@
XfmpcStatusbar* xfmpc_statusbar_new (void);
void xfmpc_statusbar_set_text (XfmpcStatusbar* self, const char* value);
static GObject * xfmpc_statusbar_constructor (GType type, guint n_construct_properties, GObjectConstructParam * construct_properties);
-static gpointer xfmpc_statusbar_parent_class = NULL;
static void xfmpc_statusbar_finalize (GObject* obj);
static void xfmpc_statusbar_set_property (GObject * object, guint property_id, const GValue * value, GParamSpec * pspec);
More information about the Goodies-commits
mailing list