Mailinglist Archive: yast-commit (590 mails)

< Previous Next >
[yast-commit] r61584 - in /trunk/gtk: ChangeLog src/pkg/ygtkpkghistorydialog.cc
  • From: rpmcruz@xxxxxxxxxxxxxxxx
  • Date: Fri, 02 Apr 2010 15:15:51 -0000
  • Message-id: <E1Nxib9-0005iz-1s@xxxxxxxxxxxxxxxx>
Author: rpmcruz
Date: Fri Apr 2 17:15:50 2010
New Revision: 61584

URL: http://svn.opensuse.org/viewcvs/yast?rev=61584&view=rev
Log:
* src/pkg/ygtkpkghistorydialog.cc: removed dead code.

Modified:
trunk/gtk/ChangeLog
trunk/gtk/src/pkg/ygtkpkghistorydialog.cc

Modified: trunk/gtk/ChangeLog
URL:
http://svn.opensuse.org/viewcvs/yast/trunk/gtk/ChangeLog?rev=61584&r1=61583&r2=61584&view=diff
==============================================================================
--- trunk/gtk/ChangeLog (original)
+++ trunk/gtk/ChangeLog Fri Apr 2 17:15:50 2010
@@ -1,3 +1,7 @@
+2010-04-02 Ricardo Cruz <rpmcruz@xxxxxxxxxxxxxxxxxxx>
+
+ * src/pkg/ygtkpkghistorydialog.cc: removed dead code.
+
2010-04-01 Ricardo Cruz <rpmcruz@xxxxxxxxxxxxxxxxxxx>

* src/pkg/ygtkpkgsearchentry.cc: bug fix: update

Modified: trunk/gtk/src/pkg/ygtkpkghistorydialog.cc
URL:
http://svn.opensuse.org/viewcvs/yast/trunk/gtk/src/pkg/ygtkpkghistorydialog.cc?rev=61584&r1=61583&r2=61584&view=diff
==============================================================================
--- trunk/gtk/src/pkg/ygtkpkghistorydialog.cc (original)
+++ trunk/gtk/src/pkg/ygtkpkghistorydialog.cc Fri Apr 2 17:15:50 2010
@@ -127,35 +127,8 @@
GtkTextTag *bold_tag;
};

-static void write_file (const char *filename, const char *text)
-{
- FILE *file = fopen (filename, "w");
- fwrite (text, strlen (text), sizeof (char), file);
- fclose (file);
-}
-
static void response_cb (GtkDialog *dialog, gint response, GtkTextBuffer
*buffer)
-{
- if (response == 1) {
- GtkWidget *_dialog = gtk_file_chooser_dialog_new ("",
GTK_WINDOW (dialog),
- GTK_FILE_CHOOSER_ACTION_SAVE, GTK_STOCK_OPEN,
GTK_RESPONSE_OK,
- GTK_STOCK_CANCEL, GTK_RESPONSE_CANCEL, NULL);
- gtk_file_chooser_set_local_only (GTK_FILE_CHOOSER (_dialog),
TRUE);
- gtk_file_chooser_set_do_overwrite_confirmation
(GTK_FILE_CHOOSER (_dialog), TRUE);
- if (gtk_dialog_run (GTK_DIALOG (_dialog)) == GTK_RESPONSE_OK) {
- gchar *filename = gtk_file_chooser_get_filename
(GTK_FILE_CHOOSER (_dialog));
- GtkTextIter start, end;
- gtk_text_buffer_get_bounds (buffer, &start, &end);
- gchar *text = gtk_text_buffer_get_text (buffer, &start,
&end, FALSE);
- write_file (filename, text);
- g_free (text);
- g_free (filename);
- }
- gtk_widget_destroy (_dialog);
- }
- else
- gtk_widget_destroy (GTK_WIDGET (dialog));
-}
+{ gtk_widget_destroy (GTK_WIDGET (dialog)); }

YGtkPkgHistoryDialog::YGtkPkgHistoryDialog()
{
@@ -195,9 +168,7 @@
gtk_container_add (GTK_CONTAINER (date_scroll), date_view);

GtkWidget *dialog = gtk_message_dialog_new (YGDialog::currentWindow(),
- GtkDialogFlags (0), GTK_MESSAGE_OTHER, GTK_BUTTONS_NONE,
_("History of Changes"));
-// gtk_dialog_add_button (GTK_DIALOG (dialog), _("Save to file"), 1);
- gtk_dialog_add_button (GTK_DIALOG (dialog), GTK_STOCK_CLOSE,
GTK_RESPONSE_DELETE_EVENT);
+ GtkDialogFlags (0), GTK_MESSAGE_OTHER, GTK_BUTTONS_CLOSE,
_("History of Changes"));
gtk_message_dialog_format_secondary_text (GTK_MESSAGE_DIALOG (dialog),
FILENAME);
gtk_dialog_set_default_response (GTK_DIALOG (dialog), GTK_RESPONSE_CLOSE);
gtk_window_set_resizable (GTK_WINDOW (dialog), TRUE);

--
To unsubscribe, e-mail: yast-commit+unsubscribe@xxxxxxxxxxxx
For additional commands, e-mail: yast-commit+help@xxxxxxxxxxxx

< Previous Next >
This Thread
  • No further messages