From 98890a8ca7a15631cd74131059a4416bb7162956 Mon Sep 17 00:00:00 2001 From: Marko Nykanen Date: Tue, 10 Nov 2009 08:21:15 +0200 Subject: [PATCH] name changed to recorder --- data/maemo_recorder.desktop | 2 +- debian/changelog | 9 +++++++++ debian/control | 8 +++++--- debian/maemo-recorder.postinst | 43 ---------------------------------------- debian/recorder.postinst | 43 ++++++++++++++++++++++++++++++++++++++++ debian/rules | 2 +- src/maemo-recorder-ui.c | 26 ++++++++++-------------- 7 files changed, 70 insertions(+), 63 deletions(-) delete mode 100644 debian/maemo-recorder.postinst create mode 100644 debian/recorder.postinst diff --git a/data/maemo_recorder.desktop b/data/maemo_recorder.desktop index 6cb93dd..f81d244 100644 --- a/data/maemo_recorder.desktop +++ b/data/maemo_recorder.desktop @@ -2,7 +2,7 @@ Encoding=UTF-8 Version=1.0 Type=Application -Name=Maemo Recorder +Name=Recorder Exec=/usr/bin/maemo_recorder Icon=maemo_recorder X-Window-Icon=maemo_recorder diff --git a/debian/changelog b/debian/changelog index 88c5695..b75ba10 100644 --- a/debian/changelog +++ b/debian/changelog @@ -1,3 +1,12 @@ +recorder (0.3.1) unstable; urgency=low + + * Name changed to Recorder + * Remove Cancel button from Save Recording dialog + * XB-Maemo-Display-Name + * Stop recording if Rec button pressed again + + -- Marko Nykanen Mon, 9 Nov 2009 16:31:37 +0200 + maemo-recorder (0.3.0) unstable; urgency=low * OS2009 version diff --git a/debian/control b/debian/control index 52ad778..7691ccf 100644 --- a/debian/control +++ b/debian/control @@ -1,16 +1,18 @@ -Source: maemo-recorder +Source: recorder Section: user/multimedia Priority: optional Maintainer: Marko Nykanen Build-Depends: debhelper (>= 4.0.0), libgstreamer0.10-dev (>= 0.10.1-1), libhildon1-dev, libgconf2-dev, libgtk2.0-dev, libhildonfm2-dev, libosso-dev (>= 0.8.4), libmodest-dbus-client-dev Standards-Version: 3.6.0 -Package: maemo-recorder +Package: recorder Architecture: any Section: user/multimedia Depends: ${shlibs:Depends} -Description: Maemo Recorder +Replaces: maemo-recorder +Description: Voice Recorder A simple graphical utility for recording audio from microphone. +XB-Maemo-Display-Name: Recorder XB-Maemo-Icon-26: iVBORw0KGgoAAAANSUhEUgAAABoAAAAaCAYAAACpSkzOAAAABmJLR0QA/wD/ AP+gvaeTAAAACXBIWXMAAAsTAAALEwEAmpwYAAAAB3RJTUUH1gkZChUC/J4t diff --git a/debian/maemo-recorder.postinst b/debian/maemo-recorder.postinst deleted file mode 100644 index 74f2f1b..0000000 --- a/debian/maemo-recorder.postinst +++ /dev/null @@ -1,43 +0,0 @@ -#! /bin/sh -# postinst script for maemo-recorder -# -# see: dh_installdeb(1) - -set -e - -# summary of how this script can be called: -# * `configure' -# * `abort-upgrade' -# * `abort-remove' `in-favour' -# -# * `abort-deconfigure' `in-favour' -# `removing' -# -# for details, see http://www.debian.org/doc/debian-policy/ or -# the debian-policy package -# - -case "$1" in - configure) - update-mime-database /usr/share/mime - update-desktop-database -q - hildon-update-category-database /usr/share/mime - ;; - - abort-upgrade|abort-remove|abort-deconfigure) - - ;; - - *) - echo "postinst called with unknown argument \`$1'" >&2 - exit 1 - ;; -esac - - # dh_installdeb will replace this with shell code automatically - # generated by other debhelper scripts. - - #DEBHELPER# - -exit 0 - diff --git a/debian/recorder.postinst b/debian/recorder.postinst new file mode 100644 index 0000000..74f2f1b --- /dev/null +++ b/debian/recorder.postinst @@ -0,0 +1,43 @@ +#! /bin/sh +# postinst script for maemo-recorder +# +# see: dh_installdeb(1) + +set -e + +# summary of how this script can be called: +# * `configure' +# * `abort-upgrade' +# * `abort-remove' `in-favour' +# +# * `abort-deconfigure' `in-favour' +# `removing' +# +# for details, see http://www.debian.org/doc/debian-policy/ or +# the debian-policy package +# + +case "$1" in + configure) + update-mime-database /usr/share/mime + update-desktop-database -q + hildon-update-category-database /usr/share/mime + ;; + + abort-upgrade|abort-remove|abort-deconfigure) + + ;; + + *) + echo "postinst called with unknown argument \`$1'" >&2 + exit 1 + ;; +esac + + # dh_installdeb will replace this with shell code automatically + # generated by other debhelper scripts. + + #DEBHELPER# + +exit 0 + diff --git a/debian/rules b/debian/rules index 628c4de..3f6e115 100755 --- a/debian/rules +++ b/debian/rules @@ -57,7 +57,7 @@ install: build dh_installdirs # Add here commands to install the package into debian/maemo-recorder. - $(MAKE) install DESTDIR=$(CURDIR)/debian/maemo-recorder + $(MAKE) install DESTDIR=$(CURDIR)/debian/recorder # Build architecture-independent files here. diff --git a/src/maemo-recorder-ui.c b/src/maemo-recorder-ui.c index 19aee13..7e7381a 100644 --- a/src/maemo-recorder-ui.c +++ b/src/maemo-recorder-ui.c @@ -55,7 +55,7 @@ #define GST_TIME_MSECS(t) \ (guint) (((GstClockTime)(t)) % GST_SECOND) -#define RECORDER_APP_TITLE "Maemo Recorder" +#define RECORDER_APP_TITLE "Recorder" #define RECORDER_MSG_READY _("Ready") #define RECORDER_MSG_STOPPED _("Stopped") #define RECORDER_MSG_PAUSED _("Paused") @@ -585,6 +585,7 @@ static gboolean cbBus(GstBus *bus, break; } + case GST_MESSAGE_ASYNC_DONE: case GST_MESSAGE_STATE_CHANGED: { GstState old; @@ -617,8 +618,7 @@ static void cbDestroy(GtkWidget* widget, GdkEvent *event, gpointer data) app = (AppData *) data; ULOG_DEBUG("delete_event"); - if (!closeFile(app)) - return; + closeFile(app); destroyPipelines(app); if (app->playPipeline) @@ -893,7 +893,7 @@ static void openPlayPipeline( AppData *data ) case FORMAT_PCM: case FORMAT_ILBC: case FORMAT_WAV: - destroyPipelines(data); + //destroyPipelines(data); //data->filter = data->file_format; createPipeline(data, PIPELINE_PLAY); break; @@ -951,7 +951,6 @@ closeFile(AppData *data) note = hildon_note_new_confirmation_add_buttons(GTK_WINDOW(data->mainView), _("Save recording?"), _("Yes"), GTK_RESPONSE_YES, _("No"), GTK_RESPONSE_NO, - _("Cancel"), GTK_RESPONSE_CANCEL, NULL); i = gtk_dialog_run(GTK_DIALOG(note)); @@ -1110,6 +1109,8 @@ static void cbRec(GtkWidget* widget, AppData *data) if (APPSTATE_READY != getAppState(data)) { ULOG_WARN("%s() - state different than READY -> return", G_STRFUNC); + if (APPSTATE_RECORDING == getAppState(data)) + cbStop(widget,data); return; } @@ -1177,7 +1178,9 @@ static void cbRec(GtkWidget* widget, AppData *data) hildon_banner_show_information(GTK_WIDGET(data->mainView), GTK_STOCK_DIALOG_ERROR, _("Could not create pipeline")); setAppState(data, APPSTATE_READY); } - + + gtk_widget_set_sensitive(data->buttonPlay, FALSE); + ULOG_DEBUG("%s() - end", G_STRFUNC); } @@ -1244,6 +1247,7 @@ static void cbStop(GtkWidget* widget, AppData *data) gtk_tool_button_set_stock_id(GTK_TOOL_BUTTON(data->buttonPlay), GTK_STOCK_MEDIA_PLAY); gtk_widget_set_state(data->buttonPlay, GTK_STATE_NORMAL); gtk_widget_set_state(data->buttonRec, GTK_STATE_NORMAL); + gtk_widget_set_sensitive(data->buttonPlay, TRUE); /* destroy related pipeline */ switch(getAppState(data)) @@ -1832,15 +1836,7 @@ static gboolean cbStopPlayback(AppData *data) ULOG_INFO("Stopping playback"); g_assert(data != NULL); - - ret = gst_element_set_state(GST_ELEMENT(data->playPipeline), - GST_STATE_PAUSED); - if (seekToZero(data, GST_ELEMENT(data->playPipeline))) - { - gtk_adjustment_set_value( - GTK_ADJUSTMENT(data->mainViewData.adjustment), 0); - gtk_adjustment_value_changed(GTK_ADJUSTMENT(data->mainViewData.adjustment)); - } + destroyPipelines(data); setAppState(data, APPSTATE_READY); gtk_tool_button_set_stock_id(GTK_TOOL_BUTTON(data->buttonPlay), GTK_STOCK_MEDIA_PLAY); gtk_widget_set_state(data->buttonPlay, GTK_STATE_NORMAL); -- 1.7.9.5