diff options
author | emanuele-f <[email protected]> | 2016-06-11 21:47:21 +0200 |
---|---|---|
committer | lukefromdc <[email protected]> | 2016-10-17 14:05:35 -0400 |
commit | afb7f9deb2337b6e4775fb9bc02b01d4a3fdb852 (patch) | |
tree | 00a7e448cd25f82ccbdfc89a48a5e626f6280c94 | |
parent | a7666d0dbe10b0ea5210b8133ead48da0ebc0b0e (diff) | |
download | caja-afb7f9deb2337b6e4775fb9bc02b01d4a3fdb852.tar.bz2 caja-afb7f9deb2337b6e4775fb9bc02b01d4a3fdb852.tar.xz |
add image unref and use localized messages
-rw-r--r-- | libcaja-private/caja-progress-info.c | 21 |
1 files changed, 14 insertions, 7 deletions
diff --git a/libcaja-private/caja-progress-info.c b/libcaja-private/caja-progress-info.c index 8b0aeb43..729409d2 100644 --- a/libcaja-private/caja-progress-info.c +++ b/libcaja-private/caja-progress-info.c @@ -310,19 +310,18 @@ update_data (ProgressWidgetData *data) status = caja_progress_info_get_status (data->info); - // TODO localize switch (data->state) { case STATE_PAUSED: - curstat = "paused"; + curstat = _("paused"); break; case STATE_PAUSING: - curstat = "pausing"; + curstat = _("pausing"); break; case STATE_QUEUED: - curstat = "queued"; + curstat = _("queued"); break; case STATE_QUEUEING: - curstat = "enqueueing"; + curstat = _("queueing"); break; default: curstat = NULL; @@ -705,6 +704,12 @@ queue_clicked (GtkWidget *queuebt, } static void +unref_callback (gpointer data) +{ + g_object_unref (data); +} + +static void start_button_init (ProgressWidgetData *data) { GtkWidget *button = gtk_button_new (); @@ -716,8 +721,10 @@ start_button_init (ProgressWidgetData *data) g_object_ref (pauseImage); g_object_ref (resumeImage); - g_object_set_data (G_OBJECT(button), STARTBT_DATA_IMAGE_PAUSE, pauseImage); - g_object_set_data (G_OBJECT(button), STARTBT_DATA_IMAGE_RESUME, resumeImage); + g_object_set_data_full (G_OBJECT(button), STARTBT_DATA_IMAGE_PAUSE, + pauseImage, unref_callback); + g_object_set_data_full (G_OBJECT(button), STARTBT_DATA_IMAGE_RESUME, + resumeImage, unref_callback); g_object_set_data (G_OBJECT(button), STARTBT_DATA_CURIMAGE, NULL); start_button_update_view (button, data->state); |