[pan2: 161/268] - cleaning - removal of useless drag'n'drop stubs



commit db9cd97ef5e2364a75a757b2b34548f32b1004dc
Author: Heinrich Mueller <sphemuel stud informatik uni-erlangen de>
Date:   Sat Sep 24 18:49:16 2011 +0200

    - cleaning
    - removal of useless drag'n'drop stubs

 pan/data/encode-cache.cc |    2 +-
 pan/gui/gui.cc           |   62 ++-------------------------------------------
 pan/gui/gui.h            |    9 +------
 pan/gui/log-ui.cc        |    2 -
 pan/gui/pan.cc           |    2 +-
 uulib/uuencode.c         |    2 +-
 6 files changed, 7 insertions(+), 72 deletions(-)
---
diff --git a/pan/data/encode-cache.cc b/pan/data/encode-cache.cc
index dc401a4..7b12d70 100644
--- a/pan/data/encode-cache.cc
+++ b/pan/data/encode-cache.cc
@@ -144,7 +144,7 @@ void EncodeCache :: finalize (std::string message_id)
   _mid_to_info[message_id]._size = sb.st_size;
   fire_added (message_id);
   _current_bytes += sb.st_size;
-  //resize(); ///TODO mt debug!
+  //resize();
 }
 
 void
diff --git a/pan/gui/gui.cc b/pan/gui/gui.cc
index b8486e5..5ecaecf 100644
--- a/pan/gui/gui.cc
+++ b/pan/gui/gui.cc
@@ -276,11 +276,9 @@ GUI :: GUI (Data& data, Queue& queue, ArticleCache& cache, EncodeCache& encode_c
   g_signal_connect (w, "clicked", G_CALLBACK(show_task_window_cb), this);
 
   // drag and drop for message-ids
-//  gtk_drag_dest_set(_workarea_bin,GTK_DEST_DEFAULT_ALL,target_list,3,GDK_ACTION_COPY);
-//  gtk_drag_dest_add_text_targets(_workarea_bin);
-//  gtk_drag_dest_add_uri_targets(_workarea_bin);
-//  g_signal_connect (_workarea_bin, "drag-data-received", G_CALLBACK(dragged_rcvd), this);
-//  g_signal_connect (_workarea_bin, "drag-drop", G_CALLBACK (dragged), this);
+  gtk_drag_dest_set(_workarea_bin,GTK_DEST_DEFAULT_ALL,target_list,3,GDK_ACTION_COPY);
+  gtk_drag_dest_add_text_targets(_workarea_bin);
+  gtk_drag_dest_add_uri_targets(_workarea_bin);
 
   gtk_container_add (GTK_CONTAINER(w), _queue_size_label);
   frame = gtk_frame_new (NULL);
@@ -588,60 +586,6 @@ GUI :: prompt_user_for_filename (GtkWindow * parent, const Prefs& prefs)
   return file;
 }
 
-/// TODO drag-n-drop of nzb files
-gboolean GUI ::dragged(GtkWidget *wgt, GdkDragContext *context, int x, int y,
-              GtkSelectionData *seldata, guint info, guint time,
-              gpointer userdata)
-{
-
-  gtk_drag_finish (context, true, true, time);
-
-  GUI * p(static_cast<GUI*>(userdata));
-
-  GdkAtom target_type;
-
-  /* If the source offers a target */
-  if (context-> targets)
-  {
-    target_type = GDK_POINTER_TO_ATOM
-            (g_list_nth_data (context-> targets, TARGET_STRING));
-
-    gtk_drag_get_data(wgt,context,target_type,time);
-  }
-
-  return true;
-
-}
-
-void GUI ::dragged_rcvd(GtkWidget *wgt, GdkDragContext *context, int x, int y,
-              GtkSelectionData *seldata, guint info, guint time,
-              gpointer userdata)
-{
-
-  gtk_drag_finish (context, true, true, time);
-
-//  GUI * p(static_cast<GUI*>(userdata));
-//
-//  GtkWidget * header_pane;
-//  GtkTreeIter   iter;
-//
-//  header_pane = GTK_WIDGET(userdata);
-////  std::cerr<<"data : "<<(gchar*)seldata->data<<std::endl;
-//  Article a;
-//  a.message_id = Quark((gchar*)seldata->data);
-//  a.xref.insert ("2", "alt.binaries.test", 0);
-//  a.set_part_count (1);
-//  a.is_binary = true;
-//  std::vector<Article> v;
-//  v.push_back(a);
-//  SaveDialog * dialog = new SaveDialog (p->_prefs, p->_group_prefs, p->_data, p->_data,
-//                                        p->_cache, p->_data, p->_queue, get_window(p->_root), p->_header_pane->get_group(), v);
-//  gtk_widget_show (dialog->root());
-
-  gtk_drag_finish (context, true, false, time);
-
-}
-
 void GUI :: do_save_articles ()
 {
   std::string path;
diff --git a/pan/gui/gui.h b/pan/gui/gui.h
index 526da90..292f79f 100644
--- a/pan/gui/gui.h
+++ b/pan/gui/gui.h
@@ -58,6 +58,7 @@ namespace pan
       GUI (Data& data, Queue&, ArticleCache&, EncodeCache&, Prefs&, GroupPrefs&);
       virtual ~GUI ();
       GtkWidget* root () { return _root; }
+      typedef std::vector<std::string> strings_t;
 
     public: // ActionManager
       virtual bool is_action_active (const char * action_name) const;
@@ -219,14 +220,6 @@ namespace pan
       std::list<Task*> _active_tasks;
       std::string _charset;
 
-      static gboolean dragged(GtkWidget *wgt, GdkDragContext *context, int x, int y,
-              GtkSelectionData *seldata, guint info, guint time,
-              gpointer userdata);
-
-      static void dragged_rcvd(GtkWidget *wgt, GdkDragContext *context, int x, int y,
-              GtkSelectionData *seldata, guint info, guint time,
-              gpointer userdata);
-
       void set_charset (const StringView& v);
 
       void upkeep ();
diff --git a/pan/gui/log-ui.cc b/pan/gui/log-ui.cc
index 47aeef7..744aa39 100644
--- a/pan/gui/log-ui.cc
+++ b/pan/gui/log-ui.cc
@@ -33,8 +33,6 @@ extern "C" {
 
 using namespace pan;
 
-///TODO : perhaps implement a tooltip for right-click?
-
 namespace
 {
   enum { COL_HIDDEN, COL_SEVERITY, COL_DATE, COL_MESSAGE, N_COLS };
diff --git a/pan/gui/pan.cc b/pan/gui/pan.cc
index 62b5c1e..3c2805d 100644
--- a/pan/gui/pan.cc
+++ b/pan/gui/pan.cc
@@ -360,7 +360,7 @@ main (int argc, char *argv[])
         queue.add_tasks (tasks, Queue::BOTTOM);
       }
 
-      // iff non-gui mode, contains a PanKiller ptr to quit pan on queue empty
+      // if non-gui mode, contains a PanKiller ptr to quit pan on queue empty
       std::auto_ptr<PanKiller> killer;
 
       // don't open the full-blown Pan, just act as a nzb client,
diff --git a/uulib/uuencode.c b/uulib/uuencode.c
index b74bb9e..6256ab6 100644
--- a/uulib/uuencode.c
+++ b/uulib/uuencode.c
@@ -699,7 +699,7 @@ UUEncodeStream_byFSize (FILE *outfile, FILE *infile, int encoding, long bpf, crc
   long rest = bpf;
   long current = 0;
 
-  ///TODO fixme!!
+  ///FIXME
 
   if (encoding == PT_ENCODED || encoding == QP_ENCODED)
     {



[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]